zendframework/zf2 — pull request #2286 by AndrejAndb (2012-09-01 18:03:57+00:00)
Title: prepareNotFoundViewModel listner -  eventResult as ViewModel if set

use case:

public function indexAction() {
$this->getResponse()->setStatusCode(404);
$viewModel->setVariable('message', 'not found article');
return $viewModel;
}

or simple:
$this->getResponse()->setStatusCode(404);
return 'not found article';