Update README.md

This commit is contained in:
filp
2013-03-14 00:33:54 +00:00
parent d92932cca7
commit e473cb96f3
+33
View File
@@ -13,6 +13,39 @@ powerful stacked error handling system.
This library is currently in a **heavy development phase, and not yet ready for consumption.**
## Integrating with Silex
`Damnit` comes packages with a Silex Service Provider: `Damnit\Silex\DamnitServiceProvider`. Using it
in your existing Silex project is easy:
```php
require 'vendor/autoload.php';
use Silex\Application;
// ... some awesome code here ...
if($app['debug']) {
$app->register(new Damnit\Silex\DamnitServiceProvider);
}
// ...
$app->run();
```
And that's about it. By default, you'll get the pretty error pages if something goes awry in your development
environment, but you also have full access to the `Damnit` library, obviously. For example, adding a new handler
into your app is as simple as extending `damnit`:
```php
$app['damnit'] = $app->extend('damnit', function($damnit) {
$damnit->pushHandler(new DeleteWholeProjectHandler);
return $damnit;
});
```
## Contributing
If you want to help, great! Here's a couple of steps/guidelines: