1 | <?php |
||
14 | class RefsRevisionLogPlugin implements IRevisionLogPlugin |
||
15 | { |
||
16 | const CACHE_FORMAT_VERSION = 1; |
||
17 | |||
18 | /** |
||
19 | * Refs affected by specific revision. |
||
20 | * |
||
21 | * @var array |
||
22 | */ |
||
23 | private $_revisionRefs = array(); |
||
24 | |||
25 | /** |
||
26 | * Revisions affecting a specific ref. |
||
27 | * |
||
28 | * @var array |
||
29 | */ |
||
30 | private $_refRevisions = array(); |
||
31 | |||
32 | /** |
||
33 | * Returns plugin name. |
||
34 | * |
||
35 | * @return string |
||
36 | */ |
||
37 | 3 | 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) |
|
83 | |||
84 | /** |
||
85 | * Find revisions by collected data. |
||
86 | * |
||
87 | * @param array $criteria Criteria. |
||
88 | * |
||
89 | * @return array |
||
90 | */ |
||
91 | 5 | public function find(array $criteria) |
|
114 | |||
115 | /** |
||
116 | * Returns information about revision. |
||
117 | * |
||
118 | * @param integer $revision Revision. |
||
119 | * |
||
120 | * @return array |
||
121 | * @throws \InvalidArgumentException When revision is not found. |
||
122 | */ |
||
123 | 2 | public function getRevisionData($revision) |
|
132 | |||
133 | /** |
||
134 | * Returns data, collected by plugin. |
||
135 | * |
||
136 | * @return array |
||
137 | */ |
||
138 | 1 | public function getCollectedData() |
|
145 | |||
146 | /** |
||
147 | * Initializes plugin using previously collected data. |
||
148 | * |
||
149 | * @param array $collected_data Collected data. |
||
150 | * |
||
151 | * @return void |
||
152 | */ |
||
153 | 6 | public function setCollectedData(array $collected_data) |
|
158 | |||
159 | /** |
||
160 | * Returns cache invalidator for this plugin data. |
||
161 | * |
||
162 | * @return string |
||
163 | */ |
||
164 | 2 | public function getCacheInvalidator() |
|
168 | |||
169 | /** |
||
170 | * Returns last known revision number. |
||
171 | * |
||
172 | * @return integer |
||
173 | */ |
||
174 | 2 | public function getLastRevision() |
|
184 | |||
185 | } |
||
186 |