imbo/imbo — pull request #148 by christeredvartsen (2013-02-22 12:26:39+00:00)
Title: Added model classes for the different resources

This PR changes the way the resources are passed through the application.

Each resource now has its own model:

* `Imbo\Model\Error`
* `Imbo\Model\Status`
* `Imbo\Model\User`
* `Imbo\Model\Images`
* `Imbo\Model\Image`
* `Imbo\Model\Metadata`

There is also a class called `Imbo\Model\ArrayModel` that is used for responses to write operations.

Content negotiation and formatting of models have also been centralized to `Imbo\Http\Response\ResponseWriter` and `Imbo\Http\Response\ResponseFormatter`. This has one drawback: The image transformation cache is no longer able to cache the convert transformation when it's applied by specifying an extension to the requested image. This means that when doing this request:

```
GET /users//images/.gif?t[]=desaturize&t[]=thumbnail
```

only the `desaturize` and `thumbnail` transformations are cached by `Imbo\EventListener\ImageTransformationCache`, and not the conversion to gif (which is triggered by `.gif` in the URL).