Skip to content

Instantly share code, notes, and snippets.

@mhujer
Created December 10, 2011 18:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mhujer/1455889 to your computer and use it in GitHub Desktop.
Save mhujer/1455889 to your computer and use it in GitHub Desktop.
Laděnka Module for ZF2 (proof of concept)
<?php
namespace Ladenka;
use Zend\Debug;
use Zend\Module\Consumer\AutoloaderProvider,
Zend\EventManager\StaticEventManager,
Nette\Diagnostics\Debugger;
class Module implements AutoloaderProvider
{
public function init()
{
$events = StaticEventManager::getInstance();
$events->attach('Zend\Mvc\Application', 'dispatch.error', function($e) {
require_once 'k:\xampp\htdocs\zf2a\vendor\Nette\loader.php';
\Nette\Diagnostics\Debugger::enable();
\Nette\Diagnostics\Debugger::toStringException($e->getParam('exception'));
}, 1000);
}
public function getAutoloaderConfig()
{
return array(
'Zend\Loader\StandardAutoloader' => array(
'namespaces' => array(
),
),
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment