# Code Coverage for /win/work/Project/ecom/core/tools/AController.php

| Code Coverage
| Classes and Traits | Functions and Methods | Lines
Total | 100.00% covered (success) | 100.00% | 1 / 1 | 100.00% covered (success) | 100.00% | 1 / 1 | CRAP | 100.00% covered (success) | 100.00% | 2 / 2
AController | 100.00% covered (success) | 100.00% | 1 / 1 | 100.00% covered (success) | 100.00% | 2 / 2 | 2 | 100.00% covered (success) | 100.00% | 2 / 2
__construct | 100.00% covered (success) | 100.00% | 1 / 1 | 1 | 100.00% covered (success) | 100.00% | 2 / 2
start | 100.00% covered (success) | 100.00% | 1 / 1 | 1 |  |  |

1 | <?php
2 |
3 | namespace Tools;
4 |
5 | // TODO RestController
6 | // TODO cliController
7 |
8 | /**
9 | * Controller abstract class
10 | **/
11 | abstract class AController
12 | {
13 | /**
14 | * @var array $params
15 | * Contains route parameter
16 | * ex: /product/:id will contains {
17 | * 0 => product
18 | * 1 => [ID]
19 | * ':id' => [ID]
20 | **/
21 | protected $params;
22 |
23 | /**
24 | * @param \Tools\Context $context
25 | * @param array $params
26 | * @throws \Exception\Error404 if parameters does not correspond
27 | * On 404 error, router will try to find another route
28 | * Initialize structure
29 | **/
30 | public function __construct($context, $params)
31 | {
32 | $this->params = $params;
33 | }
34 |
35 | /**
36 | * Fullfill Controller's request
37 | **/
38 | public abstract function start();
39 | }
40 |