/** * Render the provided model. * * @param ModelInterface $model * @return string */ public function render(ModelInterface $model) { if ($this->layout && !$model->terminate()) { $this->layout->addChild($model); $model = $this->layout; } // hack, force ZendView to return its output instead of triggering an event // see: http://mateusztymek.pl/blog/using-standalone-zend-view $model->setOption('has_parent', true); return $this->zendView->render($model); }