function handleResult(IViewContext $context) { $response = $context->getResponse(); if ($this->contentType) { $response->addHeader('Content-Type', $this->contentType); } $fileSize = filesize($this->filepath); $creation = date(DateTime::RFC822, filectime($this->filepath)); $modif = date(DateTime::RFC822, filemtime($this->filepath)); $response->addHeader('Content-Disposition', "attachment; filename=\"{$this->filename}\"; size={$fileSize}; creation-date={$creation}; modification-date={$modif}"); $response->writeFile($this->filepath); }
function handleResult(IViewContext $context) { $response = $context->getResponse(); $response->write($this->content)->finish(); }
function handleResult(IViewContext $context) { $response = $context->getResponse(); $response->redirect($this->url); }
function handleResult(IViewContext $context) { $response = $context->getResponse(); $this->view->render($response); $response->finish(); }