1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace Bone\Server; |
4
|
|
|
|
5
|
|
|
class SiteConfig |
6
|
|
|
{ |
7
|
|
|
/** @var string $title */ |
8
|
|
|
private $title; |
9
|
|
|
|
10
|
|
|
/** @var string $domain */ |
11
|
|
|
private $domain; |
12
|
|
|
|
13
|
|
|
/** @var string $baseUrl */ |
14
|
|
|
private $baseUrl; |
15
|
|
|
|
16
|
|
|
/** @var string $contactEmail */ |
17
|
|
|
private $contactEmail; |
18
|
|
|
|
19
|
|
|
/** @var string $serverEmail */ |
20
|
|
|
private $serverEmail; |
21
|
|
|
|
22
|
|
|
/** @var string $company */ |
23
|
|
|
private $company; |
24
|
|
|
|
25
|
|
|
/** @var string $address */ |
26
|
|
|
private $address; |
27
|
|
|
|
28
|
|
|
/** @var string $logo */ |
29
|
|
|
private $logo; |
30
|
|
|
|
31
|
|
|
/** @var string $emailLogo */ |
32
|
|
|
private $emailLogo; |
33
|
|
|
|
34
|
|
|
/** @var Environment $environment */ |
35
|
|
|
private $environment; |
36
|
|
|
|
37
|
|
|
/** |
38
|
|
|
* SiteConfig constructor. |
39
|
|
|
* @param array $config |
40
|
|
|
* @param Environment $environment |
41
|
|
|
*/ |
42
|
8 |
|
public function __construct(array $config, Environment $environment) |
43
|
|
|
{ |
44
|
8 |
|
$this->title = $config['title']; |
45
|
8 |
|
$this->domain = $config['domain']; |
46
|
8 |
|
$this->baseUrl = $config['baseUrl']; |
47
|
|
|
$this->contactEmail = $config['contactEmail']; |
48
|
|
|
$this->serverEmail = $config['serverEmail']; |
49
|
|
|
$this->company = $config['company']; |
50
|
|
|
$this->address = $config['address']; |
51
|
|
|
$this->logo = $config['logo']; |
52
|
|
|
$this->emailLogo = $config['emailLogo']; |
53
|
|
|
$this->environment = $environment; |
54
|
|
|
} |
55
|
|
|
|
56
|
|
|
/** |
57
|
|
|
* @return string |
58
|
|
|
*/ |
59
|
|
|
public function getTitle(): string |
60
|
|
|
{ |
61
|
|
|
return $this->title; |
62
|
|
|
} |
63
|
|
|
|
64
|
|
|
/** |
65
|
|
|
* @return string |
66
|
|
|
*/ |
67
|
|
|
public function getDomain(): string |
68
|
|
|
{ |
69
|
|
|
return $this->domain; |
70
|
|
|
} |
71
|
|
|
|
72
|
|
|
/** |
73
|
|
|
* @return string |
74
|
|
|
*/ |
75
|
|
|
public function getContactEmail(): string |
76
|
|
|
{ |
77
|
|
|
return $this->contactEmail; |
78
|
|
|
} |
79
|
|
|
|
80
|
|
|
/** |
81
|
|
|
* @return string |
82
|
|
|
*/ |
83
|
|
|
public function getServerEmail(): string |
84
|
|
|
{ |
85
|
|
|
return $this->serverEmail; |
86
|
|
|
} |
87
|
|
|
|
88
|
|
|
/** |
89
|
|
|
* @return Environment |
90
|
|
|
*/ |
91
|
|
|
public function getEnvironment(): Environment |
92
|
|
|
{ |
93
|
|
|
return $this->environment; |
94
|
|
|
} |
95
|
|
|
|
96
|
|
|
/** |
97
|
|
|
* @return string |
98
|
|
|
*/ |
99
|
|
|
public function getBaseUrl(): string |
100
|
|
|
{ |
101
|
|
|
return $this->baseUrl; |
102
|
|
|
} |
103
|
|
|
|
104
|
|
|
/** |
105
|
|
|
* @return string |
106
|
|
|
*/ |
107
|
|
|
public function getCompany(): string |
108
|
|
|
{ |
109
|
|
|
return $this->company; |
110
|
|
|
} |
111
|
|
|
|
112
|
|
|
/** |
113
|
|
|
* @return string |
114
|
|
|
*/ |
115
|
|
|
public function getAddress(): string |
116
|
|
|
{ |
117
|
|
|
return $this->address; |
118
|
|
|
} |
119
|
|
|
|
120
|
|
|
/** |
121
|
|
|
* @return string |
122
|
|
|
*/ |
123
|
|
|
public function getLogo(): string |
124
|
|
|
{ |
125
|
|
|
return $this->logo; |
126
|
|
|
} |
127
|
|
|
|
128
|
|
|
/** |
129
|
|
|
* @return string |
130
|
|
|
*/ |
131
|
|
|
public function getEmailLogo(): string |
132
|
|
|
{ |
133
|
|
|
return $this->emailLogo; |
134
|
|
|
} |
135
|
|
|
|
136
|
|
|
|
137
|
|
|
} |
138
|
|
|
|