zendframework/zf2 — pull request #2405 by basz (2012-09-22 10:09:52+00:00)
Title: Feature/accepted model controller plugin

Proof of Concept & RFC PR

Idea is to be able to determine the appropriate Model within an controller action based on the browser Accept header.

example
```php
$viewModel = $this->acceptedModel();

if ($viewModel instanceof ViewModel) {
// regular logic
$viewModel->someForm = $form;
}
if ($viewModel instanceof JsonModel) {
// json logic
$viewModel->someFormData = $form->getData(); // forms won't serialize to json
}

return $viewModel;
```

If people like this I will add a unittest and documentation...