linkorb/registry-whoops

Whoops Formatter and Handler: store exceptions in Registry.

v1.0.3 2017-02-08 16:38 UTC

This package is auto-updated.

Last update: 2024-11-29 03:42:37 UTC


README

Whoops Formatter and Handler for Registry.

Installation

$ composer require linkorb/registry-client-php linkorb/registry-whoops

Integration

Create an instance of the Registry Store client:-

use Registry\Client\ClientBuilder;
use Registry\Client\Store;

$config = array(
    'api_host' => 'registry.example.com',
    'auth' => array('myusername', 'mypassword'),
    'secure' => true,
);
$store = new Store(new ClientBuilder($config), 'myaccount', 'mystore');

and an instance of the Whoops handler:-

use Registry\Whoops\Formatter\RequestExceptionFormatter;
use Registry\Whoops\Handler\RegistryHandler;

$handler = new RegistryHandler(new RequestExceptionFormatter, $store);

and register the Whoops handler with Whoops:-

$whoops->pushHandler($handler);