It is possible to hook into the startup process of pimcore. This is useful if you want to add some custom ZF routes to the controller front or to add a controller plugin without creating a plugin.
To use the hook create a file called startup.php in /website/var/config/ or just rename the existing startup.php.example to startup.php.
This file is included at the end /pimcore/config/startup.php
Examples
You can find some examples in /website/var/config/startup.php too.
Add a custom controller plugin
$front = Zend_Controller_Front::getInstance();
$front->registerPlugin(new Website_Controller_Plugin_Custom(), 700);
Add a custom Zend Framework route
$router = $front->getRouter(); $routeCustom = new Zend_Controller_Router_Route( 'custom/:controller/:action/*', array( 'module' => 'custom', "controller" => "index", "action" => "index" ) ); $router->addRoute('custom', $routeCustom); $front->setRouter($router);