Skip to content

Instantly share code, notes, and snippets.

@andriesss
Created June 8, 2012 17:53
Show Gist options
  • Save andriesss/2897223 to your computer and use it in GitHub Desktop.
Save andriesss/2897223 to your computer and use it in GitHub Desktop.
why are these methods not called?
<?php
namespace Passy;
use Zend\ModuleManager\ModuleManager,
Zend\EventManager\StaticEventManager,
Zend\Mvc\MvcEvent;
class Module
{
public function init(ModuleManager $moduleManager)
{
$events = StaticEventManager::getInstance();
$events->attach('bootstrap', 'bootstrap', array($this, 'initView'), 100);
$events->attach('bootstrap', 'bootstrap', array($this, 'initRouter'), 200);
}
public function initView()
{
die('init view reached');
}
public function initRouter()
{
die('init router reached');
}
}
@andriesss
Copy link
Author

This causes: Fatal error: Uncaught exception 'Zend\View\Exception\RuntimeException' with message 'Zend\View\Renderer\PhpRenderer::render: Unable to render template "404"; resolver could not resolve to a file' in library\Zend\View\Renderer\PhpRenderer.php on line 462

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment