Total Complexity | 6 |
Total Lines | 49 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
16 | class RouterBootstrapper extends BaseBootstrapper |
||
17 | { |
||
18 | protected ?array $routePaths = null; |
||
19 | |||
20 | /** |
||
21 | * @return array |
||
22 | */ |
||
23 | public function getRoutePaths(): array |
||
24 | { |
||
25 | global $abterModuleManager; |
||
26 | |||
27 | if ($this->routePaths !== null) { |
||
28 | return $this->routePaths; |
||
29 | } |
||
30 | |||
31 | $this->routePaths = $abterModuleManager->getRoutePaths() ?: []; |
||
32 | |||
33 | return $this->routePaths; |
||
|
|||
34 | } |
||
35 | |||
36 | /** |
||
37 | * @param array $routePaths |
||
38 | * |
||
39 | * @return $this |
||
40 | */ |
||
41 | public function setRoutePaths(array $routePaths): self |
||
42 | { |
||
43 | $this->routePaths = $routePaths; |
||
44 | |||
45 | return $this; |
||
46 | } |
||
47 | |||
48 | |||
49 | /** |
||
50 | * Configures the router, which is useful for things like caching |
||
51 | * |
||
52 | * @SuppressWarnings(PHPMD.UnusedFormalParameter) |
||
53 | * |
||
54 | * @param Router $router The router to configure |
||
55 | */ |
||
56 | protected function configureRouter(Router $router) |
||
65 | } |
||
66 | } |
||
67 | } |
||
68 |