-- lroot <[email protected]> wrote
(on Thursday, 30 April 2009, 04:45 PM -0700):
> I seem to be having a tough time getting my Zend_Application_Module_Bootstrap
> based scripts to run. I'm using the following app structure:

<snip> 

> In my application/Bootstrap.php:
> 
> class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
> {
>     public function run()
>     {
>         $this->bootstrap('frontController');
>         $this->bootstrap('modules');
>         $this->frontController->dispatch();
>     }
> }
> 
> 
> In my application/modules/default/Bootstrap.php:
> 
> class Default_Bootstrap extends Zend_Application_Module_Bootstrap
> {
>     public function run()
>     {
>         echo "Default Bootstrap!
> ";
>     }
> }

run() in module bootstraps is never called; only the run() in the main
application bootstrap will ever be called. If you want to test that a
module bootstrap is indeed being instantiated and invoked, override the
constructor:

    public function __construct($application)
    {
        parent::__construct($application);
        echo "Bootstrap loaded!";
    }


-- 
Matthew Weier O'Phinney
Project Lead            | [email protected]
Zend Framework          | http://framework.zend.com/

Reply via email to