Pomoc - Szukaj - Użytkownicy - Kalendarz
Pełna wersja: [ZendFramework] Pluginy się nie ładują
Forum PHP.pl > Forum > PHP > Frameworki
masterix
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:
  1. <?php
  2. class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
  3. {
  4.    protected function _initAutoload()
  5.    {
  6.        $autoloader = new Zend_Application_Module_Autoloader(array(
  7.            'namespace' => 'Default_',
  8.            'basePath'  => dirname(__FILE__),
  9.        ));
  10.        //$autoloader->registerNamespace('TLS_');
  11.        return $autoloader;
  12.    }
  13.  
  14.    protected function _initView()
  15.    {
  16.        // Initialize view
  17.        $view = new Zend_View();
  18.        $view->doctype('XHTML1_STRICT');
  19.        $view->headTitle('My First Zend Framework Application');
  20.  
  21.        $view->addHelperPath( 'TLS/View/Helper', 'TLS_View_Helper' );
  22.  
  23.        // Add it to the ViewRenderer
  24.        $viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper('ViewRenderer');
  25.        $viewRenderer->setView($view);
  26.  
  27.        // Return it, so that it can be stored by the bootstrap
  28.        return $view;
  29.    }
  30.  
  31.    protected function _initControllers()
  32.    {
  33.        $this->bootstrap('FrontController');
  34.        $this->frontController->addModuleDirectory(APPLICATION_PATH.'/modules');
  35.        $this->frontController->registerPlugin(new TLS_Controller_Plugin_LayoutDirectory());
  36.        $this->frontController->registerPlugin(new TLS_Controller_Plugin_ModelDirectory());
  37.    }
  38. }
  39. ?>
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.
seth-kk
a plugin jest w zasiegu include_path?
To jest wersja lo-fi głównej zawartości. Aby zobaczyć pełną wersję z większą zawartością, obrazkami i formatowaniem proszę kliknij tutaj.
Invision Power Board © 2001-2025 Invision Power Services, Inc.