~xibo-maintainers/xibo/tempel

« back to all changes in this revision

Viewing changes to web/api/index.php

  • Committer: Dan Garner
  • Date: 2016-02-26 11:10:22 UTC
  • mto: This revision was merged to the branch mainline in revision 486.
  • Revision ID: git-v1:9cb23c8863af97521879a8cbabceffd2a47b9eb7
Initial work to inject $app into all Controllers.

Show diffs side-by-side

added added

removed removed

Lines of Context:
46
46
    )
47
47
), false);
48
48
 
49
 
$app = new \Slim\Slim(array(
 
49
$app = new \RKA\Slim(array(
50
50
    'mode' => Config::GetSetting('SERVER_MODE'),
51
51
    'debug' => false,
52
52
    'log.writer' => $logger
61
61
// Configure the Slim error handler
62
62
$app->error(function (\Exception $e) use ($app) {
63
63
    $controller = new \Xibo\Controller\Error();
 
64
    $controller->setApp($app);
64
65
    $controller->handler($e);
65
66
});
66
67
 
67
68
// Configure a not found handler
68
69
$app->notFound(function () use ($app) {
69
70
    $controller = new \Xibo\Controller\Error();
 
71
    $controller->setApp($app);
70
72
    $controller->notFound();
71
73
});
72
74