Passed
Push — main ( 497b40...6092dc )
by Alex
01:12
created

Resource::getMenu()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Erykai\Template;
4
5
abstract class Resource
6
{
7
    use TraitTemplate;
0 ignored issues
show
Bug introduced by
The trait Erykai\Template\TraitTemplate requires the property $translate which is not provided by Erykai\Template\Resource.
Loading history...
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
94
    {
95
        return $this->ext;
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
118
    {
119
        $this->themeIndex = $theme;
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
131
    {
132
        $this->themePage = $theme;
133
    }
134
135
136
}