1 | <?php |
||
14 | class SummaryRevisionLogPlugin extends AbstractRevisionLogPlugin |
||
15 | { |
||
16 | const CACHE_FORMAT_VERSION = 1; |
||
17 | |||
18 | /** |
||
19 | * Bugs affected by specific revision. |
||
20 | * |
||
21 | * @var array |
||
22 | */ |
||
23 | private $_revisionSummary = array(); |
||
24 | |||
25 | /** |
||
26 | * Revisions made by specific author. |
||
27 | * |
||
28 | * @var array |
||
29 | */ |
||
30 | private $_authorRevisions = array(); |
||
31 | |||
32 | /** |
||
33 | * Returns plugin name. |
||
34 | * |
||
35 | * @return string |
||
36 | */ |
||
37 | 5 | public function getName() |
|
41 | |||
42 | /** |
||
43 | * Parse log entries. |
||
44 | * |
||
45 | * @param \SimpleXMLElement $log Log. |
||
46 | * |
||
47 | * @return void |
||
48 | */ |
||
49 | 1 | public function parse(\SimpleXMLElement $log) |
|
68 | |||
69 | /** |
||
70 | * Find revisions by collected data. |
||
71 | * |
||
72 | * @param array $criteria Criteria. |
||
73 | * |
||
74 | * @return array |
||
75 | * @throws \InvalidArgumentException When unsupported search field given. |
||
76 | * @throws \InvalidArgumentException When malformed criterion given (e.g. no field name). |
||
77 | */ |
||
78 | 5 | public function find(array $criteria) |
|
110 | |||
111 | /** |
||
112 | * Returns information about revision. |
||
113 | * |
||
114 | * @param integer $revision Revision. |
||
115 | * |
||
116 | * @return array |
||
117 | * @throws \InvalidArgumentException When revision is not found. |
||
118 | */ |
||
119 | 2 | public function getRevisionData($revision) |
|
128 | |||
129 | /** |
||
130 | * Returns information about revisions. |
||
131 | * |
||
132 | * @param array $revisions Revisions. |
||
133 | * |
||
134 | 1 | * @return array |
|
135 | */ |
||
136 | public function getRevisionsData(array $revisions) |
||
150 | |||
151 | 6 | /** |
|
152 | 6 | * Returns data, collected by plugin. |
|
153 | 6 | * |
|
154 | * @return array |
||
155 | */ |
||
156 | public function getCollectedData() |
||
163 | |||
164 | /** |
||
165 | * Initializes plugin using previously collected data. |
||
166 | * |
||
167 | * @param array $collected_data Collected data. |
||
168 | * |
||
169 | * @return void |
||
170 | 3 | */ |
|
171 | public function setCollectedData(array $collected_data) |
||
176 | 1 | ||
177 | /** |
||
178 | 1 | * Returns cache invalidator for this plugin data. |
|
179 | * |
||
180 | * @return string |
||
181 | */ |
||
182 | public function getCacheInvalidator() |
||
186 | |||
187 | /** |
||
188 | * Returns last known revision number. |
||
189 | * |
||
190 | * @return integer |
||
191 | */ |
||
192 | public function getLastRevision() |
||
202 | |||
203 | } |
||
204 |