Witam,
Mam problem z autoloaderem. Rozkład katalogów wygląda mniej więcej tak:
- application
--modules
--configs
-library
--Zend
--ZendX
-public
-TLS
--Controller
---Plugin
----LayoutDirectory.php
I w Bootstrap.php mam kod:
<?php
class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
{
protected function _initAutoload()
{
$autoloader = new Zend_Application_Module_Autoloader
(array( 'namespace' => 'Default_',
));
//$autoloader->registerNamespace('TLS_');
return $autoloader;
}
protected function _initView()
{
// Initialize view
$view = new Zend_View();
$view->doctype('XHTML1_STRICT');
$view->headTitle('My First Zend Framework Application');
$view->addHelperPath( 'TLS/View/Helper', 'TLS_View_Helper' );
// Add it to the ViewRenderer
$viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper('ViewRenderer');
$viewRenderer->setView($view);
// Return it, so that it can be stored by the bootstrap
return $view;
}
protected function _initControllers()
{
$this->bootstrap('FrontController');
$this->frontController->addModuleDirectory(APPLICATION_PATH.'/modules');
$this->frontController->registerPlugin(new TLS_Controller_Plugin_LayoutDirectory());
$this->frontController->registerPlugin(new TLS_Controller_Plugin_ModelDirectory());
}
}
?>
No i niestety wywala się wszystko przy registerPlugin:
Fatal error: Class 'TLS_Controller_Plugin_LayoutDirectory' not found in...
Próbowałem registerNamespace, ale chyba w ZF1.8 już to nie działa. Próbowałem dodać do include_path, ale też nie bardzo. Jak to rozryźć?
pzdr.