Salut à tous,

Je viens de créer une appli simple en ZF1.8 avec ZF_Tool, depuis ce tutorial

J'aimerai utiliser les ACL (simplement) (comme dans le livre ZFiA chapitre 7).
J'ai ces fichiers :
- /library/My/Controller/Action/Helper/Acl.php
- /application/views/helpers/LoggedInUser.php.

Mais, lorsque j'ecris dans /applicaton/views/scripts/index/index.phtml ceci : echo $this->loggedInUser();. J'ai cette erreur :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
Message: Plugin by name 'LoggedInUser' was not found in the registry; used paths: Zend_View_Helper_: Zend/View/Helper/:./views/helpers/:/var/www/ZFworks/zf-mysite/application/views/helpers/
Stack trace:
 
#0 /usr/share/php/Zend/View/Abstract.php(1117): Zend_Loader_PluginLoader->load('LoggedInUser')
#1 /usr/share/php/Zend/View/Abstract.php(568): Zend_View_Abstract->_getPlugin('helper', 'loggedInUser')
#2 /usr/share/php/Zend/View/Abstract.php(335): Zend_View_Abstract->getHelper('loggedInUser')
#3 [internal function]: Zend_View_Abstract->__call('loggedInUser', Array)
#4 /var/www/ZFworks/zf-mysite/application/views/scripts/index/index.phtml(4): Zend_View->loggedInUser()
#5 /usr/share/php/Zend/View.php(107): include('/var/www/ZFwork...')
#6 /usr/share/php/Zend/View/Abstract.php(832): Zend_View->_run('/var/www/ZFwork...')
#7 /usr/share/php/Zend/Controller/Action/Helper/ViewRenderer.php(902): Zend_View_Abstract->render('index/index.pht...')
#8 /usr/share/php/Zend/Controller/Action/Helper/ViewRenderer.php(923): Zend_Controller_Action_Helper_ViewRenderer->renderScript('index/index.pht...', NULL)
#9 /usr/share/php/Zend/Controller/Action/Helper/ViewRenderer.php(962): Zend_Controller_Action_Helper_ViewRenderer->render()
#10 /usr/share/php/Zend/Controller/Action/HelperBroker.php(276): Zend_Controller_Action_Helper_ViewRenderer->postDispatch()
#11 /usr/share/php/Zend/Controller/Action.php(522): Zend_Controller_Action_HelperBroker->notifyPostDispatch()
#12 /usr/share/php/Zend/Controller/Dispatcher/Standard.php(288): Zend_Controller_Action->dispatch('indexAction')
#13 /usr/share/php/Zend/Controller/Front.php(945): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
#14 /usr/share/php/Zend/Application/Bootstrap/Bootstrap.php(77): Zend_Controller_Front->dispatch()
#15 /usr/share/php/Zend/Application.php(328): Zend_Application_Bootstrap_Bootstrap->run()
#16 /var/www/ZFworks/zf-mysite/public/index.php(26): Zend_Application->run()
#17 {main}
Alors que quand je crée un autre helpers, de la meme maniere, qui ne renvoie qu'un texte "hello", je n'ai pas d'erreur !!???

Pourquoi ?

Merci,
Fabrice