1 | <?php |
||
19 | class TaskModel extends Model |
||
20 | { |
||
21 | /** |
||
22 | * SQL table name. |
||
23 | * |
||
24 | * @var string |
||
25 | */ |
||
26 | const TABLE = 'tasks'; |
||
27 | |||
28 | /** |
||
29 | * Task status. |
||
30 | * |
||
31 | * @var int |
||
32 | */ |
||
33 | const STATUS_OPEN = 1; |
||
34 | const STATUS_CLOSED = 0; |
||
35 | |||
36 | /** |
||
37 | * Events. |
||
38 | * |
||
39 | * @var string |
||
40 | */ |
||
41 | const EVENT_MOVE_PROJECT = 'task.move.project'; |
||
42 | const EVENT_MOVE_COLUMN = 'task.move.column'; |
||
43 | const EVENT_MOVE_POSITION = 'task.move.position'; |
||
44 | const EVENT_MOVE_SWIMLANE = 'task.move.swimlane'; |
||
45 | const EVENT_UPDATE = 'task.update'; |
||
46 | const EVENT_CREATE = 'task.create'; |
||
47 | const EVENT_CLOSE = 'task.close'; |
||
48 | const EVENT_OPEN = 'task.open'; |
||
49 | const EVENT_CREATE_UPDATE = 'task.create_update'; |
||
50 | const EVENT_ASSIGNEE_CHANGE = 'task.assignee_change'; |
||
51 | const EVENT_OVERDUE = 'task.overdue'; |
||
52 | const EVENT_USER_MENTION = 'task.user.mention'; |
||
53 | const EVENT_DAILY_CRONJOB = 'task.cronjob.daily'; |
||
54 | |||
55 | /** |
||
56 | * Recurrence: status. |
||
57 | * |
||
58 | * @var int |
||
59 | */ |
||
60 | const RECURRING_STATUS_NONE = 0; |
||
61 | const RECURRING_STATUS_PENDING = 1; |
||
62 | const RECURRING_STATUS_PROCESSED = 2; |
||
63 | |||
64 | /** |
||
65 | * Recurrence: trigger. |
||
66 | * |
||
67 | * @var int |
||
68 | */ |
||
69 | const RECURRING_TRIGGER_FIRST_COLUMN = 0; |
||
70 | const RECURRING_TRIGGER_LAST_COLUMN = 1; |
||
71 | const RECURRING_TRIGGER_CLOSE = 2; |
||
72 | |||
73 | /** |
||
74 | * Recurrence: timeframe. |
||
75 | * |
||
76 | * @var int |
||
77 | */ |
||
78 | const RECURRING_TIMEFRAME_DAYS = 0; |
||
79 | const RECURRING_TIMEFRAME_MONTHS = 1; |
||
80 | const RECURRING_TIMEFRAME_YEARS = 2; |
||
81 | |||
82 | /** |
||
83 | * Recurrence: base date used to calculate new due date. |
||
84 | * |
||
85 | * @var int |
||
86 | */ |
||
87 | const RECURRING_BASEDATE_DUEDATE = 0; |
||
88 | const RECURRING_BASEDATE_TRIGGERDATE = 1; |
||
89 | |||
90 | /** |
||
91 | * Create a task. |
||
92 | * |
||
93 | * @param array $values Form values |
||
94 | * |
||
95 | * @return int |
||
96 | */ |
||
97 | public function create(array $values) |
||
127 | |||
128 | /** |
||
129 | * Update a task. |
||
130 | * |
||
131 | * @param array $values |
||
132 | * @param bool $fire_events |
||
133 | * |
||
134 | * @return bool |
||
135 | */ |
||
136 | public function update(array $values, $fire_events = true) |
||
180 | |||
181 | /** |
||
182 | * Remove a task. |
||
183 | * |
||
184 | * @param int $task_id Task id |
||
185 | * |
||
186 | * @return bool |
||
187 | */ |
||
188 | public function remove($task_id) |
||
198 | |||
199 | /** |
||
200 | * Get a the task id from a text. |
||
201 | * |
||
202 | * Example: "Fix bug #1234" will return 1234 |
||
203 | * |
||
204 | * @param string $message Text |
||
205 | * |
||
206 | * @return int |
||
207 | */ |
||
208 | public function getTaskIdFromText($message) |
||
216 | |||
217 | /** |
||
218 | * Get task progress. |
||
219 | * |
||
220 | * @param array $task |
||
221 | * @param array $columns |
||
222 | * |
||
223 | * @return int |
||
224 | */ |
||
225 | public function getProgress(array $task, array $columns) |
||
233 | |||
234 | /** |
||
235 | * Prepare data. |
||
236 | * |
||
237 | * @param array $values Form values |
||
238 | */ |
||
239 | protected function prepare(array &$values) |
||
271 | } |
||
272 |
Since your code implements the magic getter
_get
, this function will be called for any read access on an undefined variable. You can add the@property
annotation to your class or interface to document the existence of this variable.If the property has read access only, you can use the @property-read annotation instead.
Of course, you may also just have mistyped another name, in which case you should fix the error.
See also the PhpDoc documentation for @property.