1 | <?php |
||
20 | class Server extends \WebCMS\Entity\Entity |
||
21 | { |
||
22 | /** |
||
23 | * Server's name. |
||
24 | * |
||
25 | * @ORM\Column(unique=true) |
||
26 | * @var string |
||
27 | */ |
||
28 | private $name; |
||
29 | |||
30 | /** |
||
31 | * Server's ip address. |
||
32 | * |
||
33 | * @ORM\Column() |
||
34 | * @var string |
||
35 | */ |
||
36 | private $ip; |
||
37 | |||
38 | /** |
||
39 | * Path to the production environment. |
||
40 | * |
||
41 | * @ORM\Column() |
||
42 | * @var string |
||
43 | */ |
||
44 | private $path; |
||
45 | |||
46 | /** |
||
47 | * Applications associated with the production server. |
||
48 | * |
||
49 | * @orm\ManyToMany(targetEntity="Application", mappedBy="servers") |
||
50 | */ |
||
51 | private $applications; |
||
52 | |||
53 | /** |
||
54 | * Initialize applications array collection. |
||
55 | */ |
||
56 | 10 | public function __construct() |
|
60 | |||
61 | /** |
||
62 | * Add application instance into collection. |
||
63 | * |
||
64 | * @param Application $application Application instance. |
||
65 | */ |
||
66 | 5 | public function addApplication(Application $application) |
|
70 | |||
71 | /** |
||
72 | * Gets the value of name. |
||
73 | * |
||
74 | * @return string |
||
75 | */ |
||
76 | 8 | public function getName() |
|
80 | |||
81 | /** |
||
82 | * Sets the value of name. |
||
83 | * |
||
84 | * @param string $name the name |
||
85 | * |
||
86 | * @return self |
||
87 | */ |
||
88 | 9 | public function setName($name) |
|
94 | |||
95 | /** |
||
96 | * Gets the value of ip. |
||
97 | * |
||
98 | * @return string |
||
99 | */ |
||
100 | 5 | public function getIp() |
|
104 | |||
105 | /** |
||
106 | * Sets the value of ip. |
||
107 | * |
||
108 | * @param string $ip the ip |
||
109 | * |
||
110 | * @return self |
||
111 | */ |
||
112 | 9 | public function setIp($ip) |
|
118 | |||
119 | /** |
||
120 | * Gets the value of path. |
||
121 | * |
||
122 | * @return string |
||
123 | */ |
||
124 | 5 | public function getPath() |
|
128 | |||
129 | /** |
||
130 | * Sets the value of path. |
||
131 | * |
||
132 | * @param string $path the path |
||
133 | * |
||
134 | * @return self |
||
135 | */ |
||
136 | 9 | public function setPath($path) |
|
142 | |||
143 | /** |
||
144 | * Gets the value of applications. |
||
145 | * |
||
146 | * @return \Doctrine\Common\Collections\ArrayCollection |
||
147 | */ |
||
148 | 5 | public function getApplications() |
|
152 | } |
||
153 |