Total Complexity | 5 |
Total Lines | 51 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
13 | class Router |
||
14 | { |
||
15 | /** @var string */ |
||
16 | private $url; |
||
17 | |||
18 | /** @var string */ |
||
19 | private $method; |
||
20 | |||
21 | /** @var string */ |
||
22 | private $controller; |
||
23 | |||
24 | /** |
||
25 | * Router constructor. |
||
26 | * |
||
27 | * @param string $url |
||
28 | * @param string $method |
||
29 | * @param string $controller |
||
30 | */ |
||
31 | public function __construct(string $url, string $method, string $controller) |
||
36 | } |
||
37 | |||
38 | /** |
||
39 | * @return string |
||
40 | */ |
||
41 | public function getUrl(): string |
||
42 | { |
||
43 | return $this->url; |
||
44 | } |
||
45 | |||
46 | /** |
||
47 | * Run the controller |
||
48 | * |
||
49 | * @return void |
||
50 | */ |
||
51 | public function execute(string $namespace, mixed $param): void |
||
64 | } |
||
65 | } |
||
66 |