1 | <?php |
||
31 | abstract class AbstractStep implements StepInterface |
||
32 | { |
||
33 | /** |
||
34 | * @ORM\Id() |
||
35 | * @ORM\Column(name="id", type="integer") |
||
36 | * @ORM\GeneratedValue(strategy="IDENTITY") |
||
37 | * |
||
38 | * @var integer |
||
39 | */ |
||
40 | protected $id; |
||
41 | |||
42 | /** |
||
43 | * @ORM\Column(name="action_Id", type="integer", nullable=true) |
||
44 | * |
||
45 | * @var integer |
||
46 | */ |
||
47 | protected $actionId; |
||
48 | |||
49 | /** |
||
50 | * @ORM\Column(name="caller", type="string", length=35, nullable=true) |
||
51 | * |
||
52 | * @var string |
||
53 | */ |
||
54 | protected $caller; |
||
55 | |||
56 | /** |
||
57 | * @ORM\Column(name="finish_date", type="datetime", nullable=true) |
||
58 | * |
||
59 | * @var DateTime |
||
60 | */ |
||
61 | protected $finishDate; |
||
62 | |||
63 | /** |
||
64 | * @ORM\Column(name="start_date", type="datetime") |
||
65 | * |
||
66 | * @var DateTime |
||
67 | */ |
||
68 | protected $startDate; |
||
69 | |||
70 | /** |
||
71 | * @ORM\Column(name="due_date", type="datetime", nullable=true) |
||
72 | * |
||
73 | * @var DateTime |
||
74 | */ |
||
75 | protected $dueDate; |
||
76 | |||
77 | /** |
||
78 | * @ORM\Column(name="owner", type="string", length=35, nullable=true) |
||
79 | * |
||
80 | * @var string |
||
81 | */ |
||
82 | protected $owner; |
||
83 | |||
84 | /** |
||
85 | * @ORM\Column(name="status", type="string", length=40, nullable=true) |
||
86 | * |
||
87 | * @var string |
||
88 | */ |
||
89 | protected $status; |
||
90 | |||
91 | /** |
||
92 | * @ORM\Column(name="step_id", type="integer") |
||
93 | * |
||
94 | * @var integer |
||
95 | */ |
||
96 | protected $stepId; |
||
97 | |||
98 | /** |
||
99 | * |
||
100 | * @ORM\ManyToMany(targetEntity="AbstractStep") |
||
101 | * @ORM\JoinTable( |
||
102 | * name="wf_previous_step", |
||
103 | * joinColumns={@ORM\JoinColumn(name="current_step_id", referencedColumnName="id")}, |
||
104 | * inverseJoinColumns={@ORM\JoinColumn(name="previous_step_id", referencedColumnName="id")} |
||
105 | * ) |
||
106 | * |
||
107 | * @var ArrayCollection|AbstractStep[] |
||
108 | */ |
||
109 | protected $previousSteps; |
||
110 | |||
111 | |||
112 | /** |
||
113 | * |
||
114 | */ |
||
115 | public function __construct() |
||
119 | |||
120 | |||
121 | /** |
||
122 | * @return string |
||
123 | */ |
||
124 | public function getId() |
||
128 | |||
129 | /** |
||
130 | * @param string $id |
||
131 | * |
||
132 | * @return $this |
||
133 | */ |
||
134 | public function setId($id) |
||
140 | |||
141 | /** |
||
142 | * @return integer |
||
143 | */ |
||
144 | public function getActionId() |
||
148 | |||
149 | /** |
||
150 | * @param integer $actionId |
||
151 | * |
||
152 | * @return $this |
||
153 | */ |
||
154 | public function setActionId($actionId = null) |
||
160 | |||
161 | /** |
||
162 | * @return string |
||
163 | */ |
||
164 | public function getCaller() |
||
168 | |||
169 | /** |
||
170 | * @param string $caller |
||
171 | * |
||
172 | * @return $this |
||
173 | */ |
||
174 | public function setCaller($caller = null) |
||
180 | |||
181 | /** |
||
182 | * @return DateTime |
||
183 | */ |
||
184 | public function getFinishDate() |
||
188 | |||
189 | /** |
||
190 | * @param DateTime $finishDate |
||
191 | * |
||
192 | * @return $this |
||
193 | */ |
||
194 | public function setFinishDate(DateTime $finishDate = null) |
||
200 | |||
201 | /** |
||
202 | * @return DateTime |
||
203 | */ |
||
204 | public function getStartDate() |
||
208 | |||
209 | /** |
||
210 | * @param DateTime $startDate |
||
211 | * |
||
212 | * @return $this |
||
213 | */ |
||
214 | public function setStartDate(DateTime $startDate) |
||
220 | |||
221 | /** |
||
222 | * @return DateTime |
||
223 | */ |
||
224 | public function getDueDate() |
||
228 | |||
229 | /** |
||
230 | * @param DateTime $dueDate |
||
231 | * |
||
232 | * @return $this |
||
233 | */ |
||
234 | public function setDueDate(DateTime $dueDate = null) |
||
240 | |||
241 | /** |
||
242 | * @return string |
||
243 | */ |
||
244 | public function getOwner() |
||
248 | |||
249 | /** |
||
250 | * @param string $owner |
||
251 | * |
||
252 | * @return $this |
||
253 | */ |
||
254 | public function setOwner($owner) |
||
260 | |||
261 | /** |
||
262 | * @return string |
||
263 | */ |
||
264 | public function getStatus() |
||
268 | |||
269 | /** |
||
270 | * @param string $status |
||
271 | * |
||
272 | * @return $this |
||
273 | */ |
||
274 | public function setStatus($status) |
||
280 | |||
281 | /** |
||
282 | * @return string |
||
283 | */ |
||
284 | public function getStepId() |
||
288 | |||
289 | /** |
||
290 | * @param string $stepId |
||
291 | * |
||
292 | * @return $this |
||
293 | */ |
||
294 | public function setStepId($stepId) |
||
300 | |||
301 | /** |
||
302 | * @return EntryInterface |
||
303 | */ |
||
304 | abstract public function getEntry(); |
||
305 | |||
306 | /** |
||
307 | * Возвращает id процесса |
||
308 | * |
||
309 | * @return integer |
||
310 | */ |
||
311 | public function getEntryId() |
||
315 | |||
316 | /** |
||
317 | * Возвращает id предыдущхи шагов |
||
318 | * |
||
319 | */ |
||
320 | public function getPreviousStepIds() |
||
332 | |||
333 | /** |
||
334 | * @return ArrayCollection|AbstractStep[] |
||
335 | */ |
||
336 | public function getPreviousSteps() |
||
340 | |||
341 | /** |
||
342 | * @param ArrayCollection|AbstractStep[] $previousSteps |
||
343 | * |
||
344 | * @return $this |
||
345 | * |
||
346 | * @throws Exception\InvalidArgumentException |
||
347 | */ |
||
348 | public function setPreviousSteps($previousSteps) |
||
366 | } |
||
367 |
This check looks for assignments to scalar types that may be of the wrong type.
To ensure the code behaves as expected, it may be a good idea to add an explicit type cast.