Created
December 10, 2011 18:35
-
-
Save mhujer/1455889 to your computer and use it in GitHub Desktop.
Laděnka Module for ZF2 (proof of concept)
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 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