PHP code example of penny / excp-handler
1. Go to this page and download the library: Download penny/excp-handler library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
penny / excp-handler example snippets
public function __construct($current = "html", $handlers = [])
use Penny\ExcpHandler\EventListener\WhoopsListener;
return [
'event_manager' => \DI\decorate(function($eventManager, $container) {
$eventManager->attach("dispatch_error", [$container->get(WhoopsListener::class), "onError"]);
// you may need to apply to '*_error' as well...
// other event here...
return $eventManager;
}),
WhoopsListener::class => \DI\object(WhoopsListener::class),