Zend_Application et Zend_Navigation
Bonjour à tous,
J'utilise Zend_Navigation et je le configure dans ma class Bootstrap mais j'aimerai le mettre en place dans mon fichier de config (config.ini)
Actuellement j'utilise ceci qui fonctionne très bien :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
|
<?php
class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
{
protected function _initAutoload(){
....
}
protected function _initNavigation() {
$view = $this->bootstrap('layout')->getResource('layout')->getView();
$config = new Zend_Config_Xml(APPLICATION_PATH . '/configs/navigation.xml', 'nav');
$view->navigation(new Zend_Navigation($config));
}
} |
Je suis allé voir la doc http://framework.zend.com/manual/en/...resources.html mais j'aimerais lié la navigation directement à un fichier XMl. J'ai donc l'impression que je suis obligé d'utiliser Zend_Config_Xml, mais comment je peux faire pour l'intégrer dans mon fichier de configuratino ?