ZF-3889: Use of personal Loader
Description
When I load my personnal loader :
require_once "Zend/Loader.php";
require_once "Olfp/Loader.php";
with special dir all is ok :
class Olfp_Loader extends Zend_Loader
{
public static function loadClass($class, $dirs = null)
{
$dirs = array(
'./library/Client/Chu',
'./library'
);
parent::loadClass($class, $dirs);
}
public static function autoload($class)
{
try {
self::loadClass($class);
return $class;
} catch (Exception $e) {
return false;
}
}
}
when a write :
Olfp_Debug::name();
ouput is : "Olfp_Debug chu", so my special class is really loaded, it's ok.
but when a write just after this :
Zend_Session::start();
I've got an error :
Fatal error: Cannot redeclare class Zend_Session in C:\wamp\www\testPf\library\Zend\Session.php on line 49
Comments
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.