| Total Complexity | 13 |
| Total Lines | 110 |
| 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 $ext; |
||
| 13 | protected string $themeIndex; |
||
| 14 | protected string $themePage; |
||
| 15 | |||
| 16 | |||
| 17 | public function __construct(string $themeIndex, string $themePage, string $ext = "html") |
||
| 18 | { |
||
| 19 | $this->setThemeIndex($themeIndex); |
||
| 20 | $this->setThemePage($themePage); |
||
| 21 | $this->setExt($ext); |
||
| 22 | } |
||
| 23 | |||
| 24 | /** |
||
| 25 | * @return string |
||
| 26 | */ |
||
| 27 | public function getIndex(): string |
||
| 28 | { |
||
| 29 | return $this->index; |
||
| 30 | } |
||
| 31 | |||
| 32 | /** |
||
| 33 | * @param string $index |
||
| 34 | */ |
||
| 35 | protected function setIndex(string $index): void |
||
| 36 | { |
||
| 37 | $this->index = $index; |
||
| 38 | } |
||
| 39 | |||
| 40 | /** |
||
| 41 | * @return string |
||
| 42 | */ |
||
| 43 | protected function getMain(): string |
||
| 44 | { |
||
| 45 | return $this->main; |
||
| 46 | } |
||
| 47 | |||
| 48 | /** |
||
| 49 | * @param string $main |
||
| 50 | */ |
||
| 51 | protected function setMain(string $main): void |
||
| 52 | { |
||
| 53 | $this->main = $main; |
||
| 54 | } |
||
| 55 | |||
| 56 | /** |
||
| 57 | * @return string |
||
| 58 | */ |
||
| 59 | protected function getPage(): string |
||
| 60 | { |
||
| 61 | return $this->page; |
||
| 62 | } |
||
| 63 | |||
| 64 | /** |
||
| 65 | * @param string $page |
||
| 66 | */ |
||
| 67 | protected function setPage(string $page): void |
||
| 68 | { |
||
| 69 | $this->page = $page; |
||
| 70 | } |
||
| 71 | |||
| 72 | /** |
||
| 73 | * @return string |
||
| 74 | */ |
||
| 75 | protected function getExt(): string |
||
| 78 | } |
||
| 79 | |||
| 80 | /** |
||
| 81 | * @param string $ext |
||
| 82 | */ |
||
| 83 | protected function setExt(string $ext): void |
||
| 84 | { |
||
| 85 | $this->ext = $ext; |
||
| 86 | } |
||
| 87 | |||
| 88 | /** |
||
| 89 | * @return string |
||
| 90 | */ |
||
| 91 | protected function getThemeIndex(): string |
||
| 92 | { |
||
| 93 | return $this->themeIndex; |
||
| 94 | } |
||
| 95 | |||
| 96 | /** |
||
| 97 | * @param string $theme |
||
| 98 | */ |
||
| 99 | protected function setThemeIndex(string $theme): void |
||
| 102 | } |
||
| 103 | |||
| 104 | protected function getThemePage(): string |
||
| 105 | { |
||
| 106 | return $this->themePage; |
||
| 107 | } |
||
| 108 | |||
| 109 | /** |
||
| 110 | * @param string $theme |
||
| 111 | */ |
||
| 112 | protected function setThemePage(string $theme): void |
||
| 115 | } |
||
| 116 | |||
| 117 | |||
| 118 | } |