Controller.php 386 B

1234567891011121314151617181920212223
  1. <?php
  2. namespace Typemill\Controllers;
  3. /* Use the slim-container */
  4. use Interop\Container\ContainerInterface;
  5. abstract class Controller
  6. {
  7. protected $c;
  8. public function __construct(ContainerInterface $c)
  9. {
  10. $this->c = $c;
  11. }
  12. protected function render404($response, $content = NULL)
  13. {
  14. return $this->c->view->render($response->withStatus(404), '/404.twig', $content);
  15. }
  16. }
  17. ?>