Template de son choix, controllers, et Zend ?
Bonjour,
Je suis débutant sur Zend et j'ai suivi ce tuto http://zend-framework.developpez.com...g/zf/template/ pour mettre en place un template dans Zend mais j'ai un soucis.
J'ai la structure suivante :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
| - application
- default
- controllers
- views
- models
- news
- controllers
- views
- models
- administration
- controllers
- views
- models
- library
- public
+ index.php |
Voici le contenu de mon fichier index.php
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
| <?php
/**
* Bootstrap.
*/
set_include_path(
realpath('library')
. PATH_SEPARATOR . realpath('application')
. PATH_SEPARATOR . get_include_path()
);
// charge le loader général.
require 'Zend/Loader.php';
date_default_timezone_set('Europe/Paris');
Zend_Loader::loadClass('Fast_Config');
Fast_Config::load();//ou Fast_Config::load('mon fichier d\'environement');
#Fast_Debug::show('reg',Zend_Registry::getInstance());
Zend_Loader::loadClass('Fast_Controller_Front');
Fast_Controller_Front::run('application/default/controllers'); |
Comment je fais pour indiquer au contrôleur frontal où se trouvent les controleurs d'action ?
J'ai essayé
Code:
1 2 3 4 5
| Fast_Controller_Front::run( array(
'default' => 'application/controllers', // controleur par défaut
'news' => 'application/news/controllers', // controleur des news
'administration' => 'application/administration/controllers', // controleur zone admin
)); |
mais ça ne marche pas...J'ai un fatal error
Code:
1 2
|
Fatal error: Uncaught exception 'Zend_Controller_Dispatcher_Exception' with message 'Invalid controller specified (index)' |
Auriez-vous une piste ?