| Total Complexity | 5 |
| Total Lines | 47 |
| Duplicated Lines | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 12 | class Listeners extends Bootstrapper implements ILazyBootstrapper |
||
| 13 | { |
||
| 14 | const MODULE_IDENTIFIER = 'AbterPhp\\Bootstrap4Website'; |
||
| 15 | |||
| 16 | const BOOTSTRAP_4_PATH = 'bootstrap4/'; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * @return array |
||
| 20 | */ |
||
| 21 | public function getBindings(): array |
||
| 25 | ]; |
||
| 26 | } |
||
| 27 | |||
| 28 | /** |
||
| 29 | * @inheritdoc |
||
| 30 | */ |
||
| 31 | public function registerBindings(IContainer $container) |
||
| 32 | { |
||
| 33 | $resourceDir = $this->getResourceDir(); |
||
| 34 | |||
| 35 | $header = file_get_contents($resourceDir . 'header.html'); |
||
| 36 | $footer = file_get_contents($resourceDir . 'footer.html'); |
||
| 37 | |||
| 38 | $websiteDecorator = new WebsiteDecorator($header, $footer); |
||
| 39 | |||
| 40 | $container->bindInstance(WebsiteDecorator::class, $websiteDecorator); |
||
| 41 | } |
||
| 42 | |||
| 43 | /** |
||
| 44 | * @return string |
||
| 45 | */ |
||
| 46 | protected function getResourceDir(): string |
||
| 59 | } |
||
| 60 | } |
||
| 61 |