1 | <?php |
||
18 | class Application extends \WebCMS\Entity\Entity |
||
19 | { |
||
20 | /** |
||
21 | * Name of the application. |
||
22 | * |
||
23 | * @ORM\Column(name="`name`",unique=true) |
||
24 | * @var string |
||
25 | */ |
||
26 | private $name; |
||
27 | |||
28 | /** |
||
29 | * Application's path. |
||
30 | * |
||
31 | * @ORM\Column() |
||
32 | * @var string |
||
33 | */ |
||
34 | private $path; |
||
35 | |||
36 | /** |
||
37 | * Name of the application database. |
||
38 | * |
||
39 | * @ORM\Column(name="`database`") |
||
40 | * @var string |
||
41 | */ |
||
42 | private $database; |
||
43 | |||
44 | /** |
||
45 | * Prouction servers associated to application. |
||
46 | * |
||
47 | * @orm\ManyToMany(targetEntity="Server", inversedBy="servers") |
||
48 | * @var \Doctrine\Common\Collections\ArrayCollection<Server> |
||
49 | */ |
||
50 | private $servers; |
||
51 | |||
52 | /** |
||
53 | * Apache config for virtual host. |
||
54 | * |
||
55 | * @ORM\Column(type="text") |
||
56 | * @var text |
||
57 | */ |
||
58 | private $apacheConfig; |
||
59 | |||
60 | /** |
||
61 | * Constructs entity class with init of servers array collection. |
||
62 | */ |
||
63 | 7 | public function __construct() |
|
67 | |||
68 | /** |
||
69 | * Gets the value of name. |
||
70 | * |
||
71 | * @return string |
||
72 | */ |
||
73 | 6 | public function getName() |
|
77 | |||
78 | /** |
||
79 | * Sets the value of name. |
||
80 | * |
||
81 | * @param string $name the name |
||
82 | * |
||
83 | * @return self |
||
84 | */ |
||
85 | 6 | public function setName($name) |
|
91 | |||
92 | /** |
||
93 | * Gets the value of Path. |
||
94 | * |
||
95 | * @return string |
||
96 | */ |
||
97 | 6 | public function getPath() |
|
101 | |||
102 | /** |
||
103 | * Sets the value of Path. |
||
104 | * |
||
105 | * @param string $path the path name |
||
106 | * |
||
107 | * @return self |
||
108 | */ |
||
109 | 6 | public function setPath($path) |
|
115 | |||
116 | /** |
||
117 | * Gets the value of Database. |
||
118 | * |
||
119 | * @return string |
||
120 | */ |
||
121 | 6 | public function getDatabase() |
|
125 | |||
126 | /** |
||
127 | * Sets the value of Database. |
||
128 | * |
||
129 | * @param string $database the database name |
||
130 | * |
||
131 | * @return self |
||
132 | */ |
||
133 | 6 | public function setDatabase($database) |
|
139 | |||
140 | /** |
||
141 | * Gets the value of servers. |
||
142 | * |
||
143 | * @return \Doctrine\Common\Collections\ArrayCollection |
||
144 | */ |
||
145 | 6 | public function getServers() |
|
149 | |||
150 | |||
151 | /** |
||
152 | * Sets the value of server. |
||
153 | * |
||
154 | * @param Server $server the server |
||
155 | * |
||
156 | * @return void |
||
157 | */ |
||
158 | 5 | public function addServer(Server $server) |
|
163 | |||
164 | /** |
||
165 | * Removes single element from collection. |
||
166 | * |
||
167 | * @param Server $server serve to remove |
||
168 | * |
||
169 | * @return void |
||
170 | */ |
||
171 | 1 | public function removeServer(Server $server) |
|
175 | |||
176 | /** |
||
177 | * Clears servers collection. |
||
178 | * |
||
179 | * @return void |
||
180 | */ |
||
181 | 3 | public function removeServers() |
|
185 | |||
186 | /** |
||
187 | * Gets the value of apacheConfig. |
||
188 | * |
||
189 | * @return text |
||
190 | */ |
||
191 | 5 | public function getApacheConfig() |
|
195 | |||
196 | /** |
||
197 | * Sets the value of apacheConfig. |
||
198 | * |
||
199 | * @param text $apacheConfig the apache config |
||
200 | * |
||
201 | * @return self |
||
202 | */ |
||
203 | 6 | public function setApacheConfig($apacheConfig) |
|
209 | } |
||
210 |