ZF-3889: Use of personal Loader

Issue Type: Bug Created: 2008-08-07T08:31:31.000+0000 Last Updated: 2008-11-13T14:10:04.000+0000 Status: Resolved Fix version(s): - 1.7.0 (17/Nov/08)

Reporter: emilien vuillaume (arthemisia) Assignee: Thomas Weidner (thomas) Tags: - Zend_Loader

Related issues: Attachments:


When I load my personnal loader :

<pre class="highlight"> 
require_once "Zend/Loader.php";
require_once "Olfp/Loader.php";

with special dir all is ok :

<pre class="highlight"> 
class Olfp_Loader extends Zend_Loader
    public static function loadClass($class, $dirs = null)
        $dirs = array(

        parent::loadClass($class, $dirs);

    public static function autoload($class)
       try {
            return $class;
        } catch (Exception $e) {
            return false;

when a write :

<pre class="highlight"> 

ouput is : "Olfp_Debug chu", so my special class is really loaded, it's ok.

but when a write just after this :

<pre class="highlight"> 

I've got an error :

<pre class="highlight">
Fatal error: Cannot redeclare class Zend_Session in C:\wamp\www\testPf\library\Zend\Session.php on line 49


Posted by Thomas Weidner (thomas) on 2008-11-11T03:13:22.000+0000

Why don't you use the PluginLoader ? There is no need to extend the LoaderClass for providing new paths as this was the reason why the plugin loader was added.

Posted by Thomas Weidner (thomas) on 2008-11-11T03:18:29.000+0000

The described usecase is incomplete and does not fit the implementation. Feel free to reopen it when you have an other usecase.

Posted by Wil Sinclair (wil) on 2008-11-13T14:10:04.000+0000

Changing issues in preparation for the 1.7.0 release.

Have you found an issue?

See the Overview section for more details.


© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.