Created
April 27, 2012 15:52
-
-
Save hhamon/2510338 to your computer and use it in GitHub Desktop.
Listenning to the bootstrap MVC event
This file contains 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 | |
namespace NewModule; | |
use Zend\EventManager\StaticEventManager; | |
use Zend\EventManager\EventDescription as Event; | |
use Zend\EventManager\StaticEventManager; | |
class Module | |
{ | |
public function init(ModuleManager $manager) | |
{ | |
$events = StaticEventManager::getInstance(); | |
$events->attach('bootstrap', 'bootstrap', array($this, 'configureView')); | |
} | |
public function configureView(Event $e) | |
{ | |
die('triggered'); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The fix is as follow: