It’s should be me doing something wrong but i just can’t get my head around
this. So if someone can help 
me out i would be very greatful.

What i do is create a new application resource plugin resource following a
Matthew’s guide to 
http://weierophinney.net/matthew/archives/231-Creating-Re-Usable-Zend_Application-Resource-Plugins.html
Creating Re-Usable Zend_Application Resource Plugins  with the following
code:

class My_Application_Resource_Session 
    extends Zend_Application_Resource_ResourceAbstract
{
    protected $_options = array();
    
    
    public function __construct($options = null)
    {
        
    }

    public function init()
    {
        //Ensure the database resource was loaded
        $bootstrap = $this->getBootstrap();
        $bootstrap->bootstrap('View');
        $view = $bootstrap->getResource('View'); 
    }
} // class ends here


I then enable it in application.ini like this.

pluginPaths.My_Application_Resource = "My/Application/Resource" 
resources.session.enabled = true


Ok, everything is fine by now, the plugin gets loaded and executed. But as
soon as it gets to bootstraping 
a view resource I get an exception saying:

Fatal error: Call to a member function bootstrap() on a non-object in
/../My/Application/Resource/Session.php

that is because $this->getBootstrap() returns NULL instead of bootstrap for
some reason.

So what could probably be wrong here? Maybe i’m boostraping something wrong?
Just no idea what’s the 
problem here.

Dmitry.
-- 
View this message in context: 
http://n4.nabble.com/Can-t-get-bootstrap-in-application-resource-plugin-tp1838417p1838417.html
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to