Implement WIP routing.
[rock.divinelegy.git] / Controllers / AbstractBaseController.php
1 <?php
2
3 namespace Controllers;
4
5 use Controllers\IDivineController;
6 use Services\Http\HttpRequest;
7 use Exception;
8
9 abstract class AbstractBaseController
10 {
11 protected $_jsonResponse;
12
13 //TODO: Not really used as this application probably won't have views.
14 //But hey, the intended usage is when you want a controller to not render
15 //a view. So it's there if I ever use this for anything else.
16 public function setJsonResponse($bool) {
17 if(!is_bool($bool)) {
18 throw new Exception('Not a boolean value.');
19 }
20
21 $this->_jasonResponse = $bool;
22 }
23 }