Created
October 20, 2010 13:48
-
-
Save robzienert/636430 to your computer and use it in GitHub Desktop.
This bootstrap process doesn't seem correct.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| class Sites_Bootstrap extends Zend_Application_Module_Bootstrap | |
| { | |
| public function initResourceLoader() | |
| { | |
| $loader = $this->getResourceLoader(); | |
| $loader->addResourceType('helper', 'helpers', 'Helper'); | |
| } | |
| protected function _initHelpers() | |
| { | |
| Zend_Controller_Action_HelperBroker::addPath(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'helpers', 'Sites_Helper'); | |
| } | |
| // Using this method, the Action Controller still acts like it can't find | |
| // a helper by the name of 'search'... | |
| // protected function _initHelpers() | |
| // { | |
| // Zend_Controller_Action_HelperBroker::addHelper(new Sites_Helper_Search()); | |
| // } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| class Sites_FooController extends Zend_Controller_Action | |
| { | |
| public function searchAction() | |
| { | |
| $this->_helper->search($this->_getParam('query', null), $this->_getParam('page', 1)); | |
| exit; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment