| 1 | <?php |
||
| 14 | class Module extends Framework |
||
| 15 | { |
||
| 16 | /** |
||
| 17 | * Required configuration fields |
||
| 18 | * @var array |
||
| 19 | */ |
||
| 20 | protected $requiredFields = ['router']; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * @var Router |
||
| 24 | */ |
||
| 25 | public $router; |
||
| 26 | |||
| 27 | |||
| 28 | /** |
||
| 29 | * Load the router by including the file. |
||
| 30 | * @codeCoverageIgnore |
||
| 31 | * |
||
| 32 | * @param string $file |
||
| 33 | * @return Router |
||
| 34 | */ |
||
| 35 | protected function loadRouter($file) |
||
| 39 | |||
| 40 | /** |
||
| 41 | * Initialize the router |
||
| 42 | */ |
||
| 43 | protected function initRouter() |
||
| 53 | |||
| 54 | /** |
||
| 55 | * Initialize the module |
||
| 56 | */ |
||
| 57 | public function _initialize() |
||
| 63 | |||
| 64 | |||
| 65 | /** |
||
| 66 | * Before each test |
||
| 67 | * |
||
| 68 | * @param TestInterface $test |
||
| 69 | */ |
||
| 70 | public function _before(TestInterface $test) |
||
| 79 | |||
| 80 | /** |
||
| 81 | * After each test |
||
| 82 | * |
||
| 83 | * @param TestInterface $test |
||
| 84 | */ |
||
| 85 | public function _after(TestInterface $test) |
||
| 93 | } |
||
| 94 |