ballhogjoni Posted October 23, 2008 Share Posted October 23, 2008 I have this class and want to return an instance of another class. The class name is in the code below: class Vendor_Interface_AutoSendVoucher extends Vendor_Interface_Abstract{ function getEmailLib(){ //my class name is Vendor_EmailLib_AutoSendVoucher return; } {/code] Quote Link to comment Share on other sites More sharing options...
ballhogjoni Posted October 23, 2008 Author Share Posted October 23, 2008 would this work function getEmailLib(){ ClassLoader::loadClass('Vendor_Interface_EmailLib_AutoSendVoucher'); return new Vendor_Interface_EmailLib_AutoSendVoucher(); } Quote Link to comment Share on other sites More sharing options...
trq Posted October 23, 2008 Share Posted October 23, 2008 would this work function getEmailLib(){ ClassLoader::loadClass('Vendor_Interface_EmailLib_AutoSendVoucher'); return new Vendor_Interface_EmailLib_AutoSendVoucher(); } Yes. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.