-- Tomáš Procházka <[EMAIL PROTECTED]> wrote
(on Thursday, 25 October 2007, 07:19 AM +0200):
> Hi Matthew Weier O'Phinney.
> 
> Maybe, you don't understand me.
> 
> Static method Zend_Loader::loadClass(); doesn't use my registered
> class loader with  MyZendLoader::registerAutoload('MyZendLoader'); I
> think, that this is bug.
> 
> Zend Framework use Zend_Loader::loadClass() for loading my own
> classes, for example my rowClass in Zend_DB_Table_Abstract. But I
> don't have any way to use own classloader for it.
> 
> I must modified Zend_Loader clas for do it. I added this to loadClass()
> 
>     if (spl_autoload_functions()!==false) {
>           spl_autoload_call($class);
>           return;
>     } 
> 
> But I don't like if I must modify Zend Framework files.

Okay, so what I think I'm hearing here is that, because you're naming
your class files using a different standard than Zend Framework uses,
when ZF components use Zend_Loader::loadClass() to load a class, your
class files are not found.

My first inclination is to say, "Tough. Follow our standards," but
that's not how we do things here in ZF. :-)

Please open an issue in the tracker and post this patch so we can
review it for inclusion.


> -------------------------- Original message --------------------------
>        From: Matthew Weier O'Phinney <[EMAIL PROTECTED]>
>     Subject: [fw-general] extended Zend_Loader
>        Date: Thursday, October 18, 2007, 7:59:16 PM
> Attachments: <none>
>       msgid:[EMAIL PROTECTED]
> 
> M> -- Tomáš Procházka <[EMAIL PROTECTED]> wrote
> M> (on Thursday, 18 October 2007, 07:37 PM +0200):
> >> Hi.
> 
> >> I need use Zend for my old project which use different style of class
> >> name. I use class.ClassName.php. Problem of Zend_Loader that I can't
> >> modify it. I can make extension, but Zend Internal use
> >> "Zend_Loader::loadClass($this->_rowClass);" I think, that this is not
> >> good idea.
> 
> >> When I have set this:
> >> MyZendLoader::registerAutoload('MyZendLoader');
> >> Zend_Loader should use this.
> 
> >> What about add this to loadClass() method?
> 
> >> if (spl_autoload_functions()!==false) spl_autoload_call($class);
> 
> M> The beauty of spl_autoload is that you can register as many autoloaders
> M> as you want. If you need to register a different one for your own
> M> classes, do so at any point either before or after calling
> M> Zend_Loader::registerAutoload().
> 
> 
> ----------------------- End of original message ----------------------
> 
> -- 
>  Tomas Prochazka
> 

-- 
Matthew Weier O'Phinney
PHP Developer            | [EMAIL PROTECTED]
Zend - The PHP Company   | http://www.zend.com/

Reply via email to