Passed
Push — main ( a0fa01...2601ca )
by Alex
01:51 queued 36s
created

Resource::setThemeIndex()   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 1
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 $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
76
    {
77
        return $this->ext;
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
100
    {
101
        $this->themeIndex = $theme;
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
113
    {
114
        $this->themePage = $theme;
115
    }
116
117
118
}