| Total Complexity | 15 |
| Total Lines | 128 |
| Duplicated Lines | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 5 | abstract class Resource |
||
| 6 | { |
||
| 7 | use TraitTemplate; |
||
|
|
|||
| 8 | |||
| 9 | protected string $index; |
||
| 10 | protected string $main; |
||
| 11 | protected string $page; |
||
| 12 | protected string $menu; |
||
| 13 | protected string $ext; |
||
| 14 | protected string $themeIndex; |
||
| 15 | protected string $themePage; |
||
| 16 | |||
| 17 | |||
| 18 | public function __construct(string $themeIndex, string $themePage, string $ext = "html", $menu = null) |
||
| 19 | { |
||
| 20 | $this->setThemeIndex($themeIndex); |
||
| 21 | $this->setThemePage($themePage); |
||
| 22 | $this->setMenu($menu); |
||
| 23 | $this->setExt($ext); |
||
| 24 | } |
||
| 25 | |||
| 26 | /** |
||
| 27 | * @return string |
||
| 28 | */ |
||
| 29 | public function getIndex(): string |
||
| 30 | { |
||
| 31 | return $this->index; |
||
| 32 | } |
||
| 33 | |||
| 34 | /** |
||
| 35 | * @param string $index |
||
| 36 | */ |
||
| 37 | protected function setIndex(string $index): void |
||
| 38 | { |
||
| 39 | $this->index = $index; |
||
| 40 | } |
||
| 41 | |||
| 42 | /** |
||
| 43 | * @return string |
||
| 44 | */ |
||
| 45 | protected function getMain(): string |
||
| 46 | { |
||
| 47 | return $this->main; |
||
| 48 | } |
||
| 49 | |||
| 50 | /** |
||
| 51 | * @param string $main |
||
| 52 | */ |
||
| 53 | protected function setMain(string $main): void |
||
| 54 | { |
||
| 55 | $this->main = $main; |
||
| 56 | } |
||
| 57 | |||
| 58 | /** |
||
| 59 | * @return string |
||
| 60 | */ |
||
| 61 | protected function getPage(): string |
||
| 62 | { |
||
| 63 | return $this->page; |
||
| 64 | } |
||
| 65 | |||
| 66 | /** |
||
| 67 | * @param string $page |
||
| 68 | */ |
||
| 69 | protected function setPage(string $page): void |
||
| 70 | { |
||
| 71 | $this->page = $page; |
||
| 72 | } |
||
| 73 | |||
| 74 | /** |
||
| 75 | * @return string |
||
| 76 | */ |
||
| 77 | protected function getMenu(): string |
||
| 78 | { |
||
| 79 | return $this->menu; |
||
| 80 | } |
||
| 81 | |||
| 82 | /** |
||
| 83 | * @param ?string $menu |
||
| 84 | */ |
||
| 85 | protected function setMenu(?string $menu): void |
||
| 86 | { |
||
| 87 | $this->menu = $menu; |
||
| 88 | } |
||
| 89 | |||
| 90 | /** |
||
| 91 | * @return string |
||
| 92 | */ |
||
| 93 | protected function getExt(): string |
||
| 96 | } |
||
| 97 | |||
| 98 | /** |
||
| 99 | * @param string $ext |
||
| 100 | */ |
||
| 101 | protected function setExt(string $ext): void |
||
| 102 | { |
||
| 103 | $this->ext = $ext; |
||
| 104 | } |
||
| 105 | |||
| 106 | /** |
||
| 107 | * @return string |
||
| 108 | */ |
||
| 109 | protected function getThemeIndex(): string |
||
| 110 | { |
||
| 111 | return $this->themeIndex; |
||
| 112 | } |
||
| 113 | |||
| 114 | /** |
||
| 115 | * @param string $theme |
||
| 116 | */ |
||
| 117 | protected function setThemeIndex(string $theme): void |
||
| 120 | } |
||
| 121 | |||
| 122 | protected function getThemePage(): string |
||
| 123 | { |
||
| 124 | return $this->themePage; |
||
| 125 | } |
||
| 126 | |||
| 127 | /** |
||
| 128 | * @param string $theme |
||
| 129 | */ |
||
| 130 | protected function setThemePage(string $theme): void |
||
| 133 | } |
||
| 134 | |||
| 135 | |||
| 136 | } |