0
votes

i have question about loading files

my Application.ini

pluginPaths.Plugins = APPLICATION_PATH "/Plugins"
autoloaderNamespaces[] = "Plugin_"
resources.frontController.plugins[] = "Plugin_Layout"
resources.frontController.plugins[] = "Plugin_Test"

file application/Plugins/Layout.php

content:

class Plugin_Layout extends Zend_Controller_Plugin_Abstract
{
    public function preDispatch(Zend_Controller_Request_Abstract $request)
    {
      echo 'Plugin_Layout';;
    }
}

file application/Plugins/Test.php

class Plugin_Test extends Zend_Controller_Plugin_Abstract{

    public function postDispatch(Zend_Controller_Request_Abstract $request){

        die('MeaHpl');
    }
}

error : Warning: include_once(): Failed opening 'Plugin/Test.php' for inclusion (include_path='/home/grek/public_html/biletynaraty/application/../library:/home/grek/public_html/biletynaraty/application/../library/Vendor/mea:/home/grek/public_html/biletynaraty/library:.:/usr/share/php:/usr/share/pear') in /home/grek/public_html/biletynaraty/library/Zend/Loader.php on line 134

Why Layout is loaded - Test not ??

if i remove Plugin_Test from application ini i get on page : Plugin_Layout so this operation is called

1

1 Answers

0
votes

Drop this line

pluginPaths.Plugins = APPLICATION_PATH "/Plugins"

and move your plugins under library/Plugin and your code should just work fine.