1 | <?php |
||
11 | class Device |
||
12 | { |
||
13 | |||
14 | /** |
||
15 | * @ORM\Column(type="integer") |
||
16 | * @ORM\Id |
||
17 | * @ORM\GeneratedValue(strategy="AUTO") |
||
18 | */ |
||
19 | private $id; |
||
20 | |||
21 | /** |
||
22 | * @ORM\Column(type="string", length=100) |
||
23 | */ |
||
24 | private $name; |
||
25 | |||
26 | /** |
||
27 | * @ORM\Column(type="string", length=100) |
||
28 | */ |
||
29 | private $alias; |
||
30 | /** |
||
31 | * @ORM\Column(type="simple_array", nullable=true) |
||
32 | */ |
||
33 | private $type; |
||
34 | |||
35 | /** |
||
36 | * @ORM\Column(type="simple_array", nullable=true) |
||
37 | */ |
||
38 | private $params; |
||
39 | |||
40 | /** |
||
41 | * @ORM\Column(type="simple_array", nullable=true) |
||
42 | */ |
||
43 | private $state = []; |
||
44 | |||
45 | /** |
||
46 | * @return mixed |
||
47 | */ |
||
48 | public function getState() |
||
58 | |||
59 | /** |
||
60 | * @param mixed $state |
||
61 | * @return Device |
||
62 | */ |
||
63 | 1 | public function setState($state) |
|
64 | { |
||
65 | |||
66 | 1 | $tmp = []; |
|
67 | |||
68 | 1 | foreach ($state as $key => $value) { |
|
69 | 1 | if (is_numeric($key)) { |
|
70 | $tmp[] = $value; |
||
71 | } else { |
||
72 | 1 | $tmp[] = $key.':'.$value; |
|
73 | } |
||
74 | } |
||
75 | |||
76 | 1 | $this->state = $tmp; |
|
77 | 1 | return $this; |
|
78 | } |
||
79 | |||
80 | /** |
||
81 | * @return mixed |
||
82 | */ |
||
83 | public function getParams() |
||
87 | |||
88 | /** |
||
89 | * @param mixed $params |
||
90 | * @return Device |
||
91 | */ |
||
92 | public function setParams($params) |
||
97 | |||
98 | /** |
||
99 | * @return [Action] |
||
|
|||
100 | */ |
||
101 | public function getActions() |
||
105 | |||
106 | /** |
||
107 | * @param mixed $actions |
||
108 | * @return Device |
||
109 | */ |
||
110 | public function setActions($actions) |
||
115 | |||
116 | /** |
||
117 | * @ORM\OneToMany(targetEntity="AppBundle\Entity\Action", mappedBy="device") |
||
118 | */ |
||
119 | private $actions; |
||
120 | |||
121 | |||
122 | /** |
||
123 | * @return mixed |
||
124 | */ |
||
125 | public function getId() |
||
129 | |||
130 | /** |
||
131 | * @param mixed $id |
||
132 | * @return Device |
||
133 | */ |
||
134 | public function setId($id) |
||
139 | |||
140 | /** |
||
141 | * @return mixed |
||
142 | */ |
||
143 | public function getName() |
||
147 | |||
148 | /** |
||
149 | * @param string $name |
||
150 | * @return Device |
||
151 | */ |
||
152 | 1 | public function setName($name) |
|
153 | { |
||
154 | 1 | $this->name = $name; |
|
155 | 1 | return $this; |
|
156 | } |
||
157 | |||
158 | /** |
||
159 | * @return mixed |
||
160 | */ |
||
161 | public function getAlias() |
||
165 | |||
166 | /** |
||
167 | * @param string $alias |
||
168 | * @return Device |
||
169 | */ |
||
170 | 1 | public function setAlias($alias) |
|
171 | { |
||
172 | 1 | $this->alias = $alias; |
|
173 | 1 | return $this; |
|
174 | } |
||
175 | |||
176 | /** |
||
177 | * @return mixed |
||
178 | */ |
||
179 | public function getType() |
||
183 | |||
184 | /** |
||
185 | * @param mixed $type |
||
186 | * @return Device |
||
187 | */ |
||
188 | public function setType($type) |
||
193 | |||
194 | public function __toString() |
||
198 | } |
||
199 |
This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.