zf-fr/ZfrRest — pull request #8 by bakura10 (2012-12-22 16:41:56+00:00)
Title: Initial architecture for response codes

This implements the functionnality for this task: https://github.com/zf-fr/ZfrRest/issues/6

It allows to throw an exception in a controller, either using a built-in standard exception:

```php
throw new \ZfrRest\Http\Exception\Client\NotFoundException('this was not found !!!!!');
```

or using a standard Client/Server exception for more exotic response code:

```php
throw new \ZfrRest\Http\Exception\ClientException(403, 'this was not found !!!!!');
```

It adds a listener to the dispatch.error event to correctly set response code, content and other headers that may be needed (for instance, it automatically adds a WWW-Authenticate header for 401 error as it's needed).

Does the architecture makes sense to you @ocramius ? Or should it be different ? To me it looks good.

(Btw, could you setup Travis and the tests bootstrap thing ? You're much better than me at this...)