1 | <?php |
||
20 | class Updater extends RepositoryUpdater |
||
21 | { |
||
22 | /** |
||
23 | * @var Message\Queue |
||
24 | */ |
||
25 | protected $model; |
||
26 | |||
27 | public function __construct(Message\Queue $model) |
||
31 | |||
32 | /** |
||
33 | * Insert a record into the message queue. |
||
34 | * |
||
35 | * @param string $name |
||
36 | * @param Model $model |
||
37 | * @param int|User $changeBy |
||
38 | * |
||
39 | * @return void |
||
40 | */ |
||
41 | public function queue($name, Model $model, $changeBy) |
||
66 | |||
67 | /** |
||
68 | * Insert a record into the message queue about a delete event. |
||
69 | * |
||
70 | * @param string $name |
||
71 | * @param Model $model |
||
72 | * @param int|User $changeBy |
||
73 | * |
||
74 | * @return void |
||
75 | */ |
||
76 | public function queueDelete($name, Model $model, $changeBy) |
||
86 | |||
87 | /** |
||
88 | * Insert records about tag changes into the message queue. |
||
89 | * |
||
90 | * @param Issue $issue |
||
91 | * @param array $added |
||
92 | * @param array $removed |
||
93 | * @param User $changeBy |
||
94 | * |
||
95 | * @return mixed |
||
96 | */ |
||
97 | public function queueIssueTagChanges(Issue $issue, array $added, array $removed, User $changeBy) |
||
107 | |||
108 | /** |
||
109 | * Returns an array containing the data needed for the message queue save. |
||
110 | * |
||
111 | * @param string $name |
||
112 | * @param Model $model |
||
113 | * @param int|User $changeBy |
||
114 | * @param array $payload |
||
115 | * |
||
116 | * @return array |
||
117 | */ |
||
118 | protected function getFillAttributes($name, Model $model, $changeBy, array $payload) |
||
131 | } |
||
132 |