Hello,

I have another problem related to the bootsrap, i have created a main
bootsrap which uses the db resource to setup database, then i created two
modules:

application
bootstrap (the application bootstrap)
-modules
--articles
---bootstrap (the articles module bootstrap)
--categories
---bootstrap (the categories module bootstrap)

i want to create a translations.tmx a config.ini and a routes.xml file for
each module, i use zend_application an wanted to create a bootstrap for each
module, then the module bootstrap should setup the module routes,
translations and use the module config file ...

i tried to implement the routes but this doesnt work, heres my code:

<?php

class Categories_Bootstrap extends Zend_Application_Module_Bootstrap {

    public $frontController;

    // ROUTES
    protected function _initCategoriesRoutes() {

        $logger = Zend_Registry::get('Logger');
        $errorMessage = 'categories bootstrap called';
        $logger->log($errorMessage, Zend_Log::ERR);

        //ROUTING
        //$this->bootstrap('frontController');
        $front = Zend_Controller_Front::getInstance();
        //$router = $this->frontController->getRouter();
        $router = $front->getRouter();
        $routes = new
Zend_Config_Xml(APPLICATION_PATH.'/categories/configs/routes.xml',
APPLICATION_ENVIRONMENT);
        $router->addConfig($routes);
        //$this->frontController->setRouter($router);
        $front->setRouter($router);

    }

}

does somebody know why it doesnt work?

chris

Reply via email to