Exemplo n.º 1
0
 /**
  * @param ViewFactoryInterface $viewFactory A view factory.
  */
 public function before(ViewFactoryInterface $viewFactory)
 {
     $this->template = $viewFactory->get('template');
 }
Exemplo n.º 2
0
 /**
  * The home page.
  *
  * @param ViewFactoryInterface $viewFactory A view factory.
  * @return ViewInterface A view.
  */
 public function actionHome(ViewFactoryInterface $viewFactory)
 {
     $view = $viewFactory->get('home');
     $this->template->content = $view;
     return $this->template;
 }
Exemplo n.º 3
0
 /**
  * @return ResponseInterface
  */
 public function defaultAction()
 {
     return new HtmlResponse((string) $this->viewFactory->get('web/index/default'));
 }
Exemplo n.º 4
0
 /**
  * @param ServerRequestInterface $request
  * @param ResponseInterface $response
  *
  * @return ResponseInterface
  */
 public function error504Action(ServerRequestInterface $request, ResponseInterface $response)
 {
     return new HtmlResponse((string) $this->viewFactory->get('web/error/504'));
 }