https://github.com/linkorb/registry-whoops
Whoops Handler for the Registry service
https://github.com/linkorb/registry-whoops
Last synced: 5 months ago
JSON representation
Whoops Handler for the Registry service
- Host: GitHub
- URL: https://github.com/linkorb/registry-whoops
- Owner: linkorb
- Created: 2016-12-20T06:50:27.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-02-08T16:43:21.000Z (over 9 years ago)
- Last Synced: 2026-01-14T15:49:01.344Z (5 months ago)
- Language: PHP
- Size: 5.86 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Registry Whoops
Whoops Formatter and Handler for Registry.
## Installation
```sh
$ composer require linkorb/registry-client-php linkorb/registry-whoops
```
## Integration
Create an instance of the Registry Store client:-
```php
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:-
```php
use Registry\Whoops\Formatter\RequestExceptionFormatter;
use Registry\Whoops\Handler\RegistryHandler;
$handler = new RegistryHandler(new RequestExceptionFormatter, $store);
```
and register the Whoops handler with Whoops:-
```php
$whoops->pushHandler($handler);
```