1 | <?php |
||
16 | class SqsWorker implements EntityInterface |
||
17 | { |
||
18 | use EntityJobNameTrait; |
||
19 | |||
20 | /** |
||
21 | * @ORM\Id |
||
22 | * @ORM\GeneratedValue(strategy="AUTO") |
||
23 | * @ORM\Column(type="bigint", name="id") |
||
24 | */ |
||
25 | protected $id; |
||
26 | |||
27 | /** |
||
28 | * @ORM\Column(type="string", name="server", nullable=false) |
||
29 | */ |
||
30 | protected $server; |
||
31 | |||
32 | /** |
||
33 | * @ORM\Column(type="string", name="queue", nullable=false) |
||
34 | */ |
||
35 | protected $queue; |
||
36 | |||
37 | /** |
||
38 | * @var string |
||
39 | * @ORM\Column(type="string", name="prefix", nullable=true) |
||
40 | */ |
||
41 | protected $prefix; |
||
42 | |||
43 | /** |
||
44 | * @ORM\Column(type="integer", name="proc_id", nullable=false) |
||
45 | */ |
||
46 | protected $procId; |
||
47 | |||
48 | /** |
||
49 | * @ORM\Column(type="datetime", name="created_at") |
||
50 | */ |
||
51 | protected $createdAt; |
||
52 | |||
53 | /** |
||
54 | * @ORM\Column(type="datetime", name="updated_at") |
||
55 | */ |
||
56 | protected $updatedAt; |
||
57 | |||
58 | /** |
||
59 | * @return mixed |
||
60 | */ |
||
61 | public function getId() |
||
65 | |||
66 | /** |
||
67 | * @return mixed |
||
68 | */ |
||
69 | public function getServer() |
||
73 | |||
74 | /** |
||
75 | * @param $server |
||
76 | * @return $this |
||
77 | */ |
||
78 | public function setServer($server) |
||
83 | |||
84 | /** |
||
85 | * @return mixed |
||
86 | */ |
||
87 | public function getQueue() |
||
91 | |||
92 | /** |
||
93 | * @param $queue |
||
94 | * @return $this |
||
95 | */ |
||
96 | public function setQueue($queue) |
||
101 | |||
102 | /** |
||
103 | * @return mixed |
||
104 | */ |
||
105 | public function getPrefix() |
||
109 | |||
110 | /** |
||
111 | * @param mixed $prefix |
||
112 | * @return $this |
||
113 | */ |
||
114 | public function setPrefix($prefix) |
||
119 | |||
120 | |||
121 | |||
122 | /** |
||
123 | * @return mixed |
||
124 | */ |
||
125 | public function getProcId() |
||
129 | |||
130 | /** |
||
131 | * @param int $procId |
||
132 | * @return $this |
||
133 | */ |
||
134 | public function setProcId($procId) |
||
139 | |||
140 | /** |
||
141 | * @return mixed |
||
142 | */ |
||
143 | public function getStatus() |
||
147 | |||
148 | /** |
||
149 | * @return mixed |
||
150 | */ |
||
151 | public function getCreatedAt() |
||
155 | |||
156 | /** |
||
157 | * @param $createdAt |
||
158 | * @return $this |
||
159 | */ |
||
160 | public function setCreatedAt($createdAt) |
||
165 | |||
166 | /** |
||
167 | * @return mixed |
||
168 | */ |
||
169 | public function getUpdatedAt() |
||
173 | |||
174 | /** |
||
175 | * @param $updatedAt |
||
176 | * @return $this |
||
177 | */ |
||
178 | public function setUpdatedAt($updatedAt) |
||
183 | |||
184 | /** |
||
185 | * @ORM\PrePersist() |
||
186 | */ |
||
187 | public function createDate() |
||
192 | |||
193 | /** |
||
194 | * @ORM\PreUpdate() |
||
195 | */ |
||
196 | public function updateDate() |
||
200 | |||
201 | /** |
||
202 | * @param QueueName $queueName |
||
203 | */ |
||
204 | public function setQueueName(QueueName $queueName) |
||
210 | |||
211 | |||
212 | } |
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: