1 | <?php |
||
27 | class CacheInvalidator { |
||
28 | |||
29 | /** |
||
30 | * @var CacheInvalidator |
||
31 | */ |
||
32 | private static $instance = null; |
||
33 | |||
34 | /** |
||
35 | * @var GlossaryCache |
||
36 | */ |
||
37 | private $cache = null; |
||
38 | |||
39 | /** |
||
40 | * @since 1.0 |
||
41 | * |
||
42 | * @return CacheInvalidator |
||
43 | */ |
||
44 | 4 | public static function getInstance() { |
|
56 | |||
57 | /** |
||
58 | * @since 1.0 |
||
59 | */ |
||
60 | 1 | public static function clear() { |
|
63 | |||
64 | /** |
||
65 | * @since 1.0 |
||
66 | * |
||
67 | * @param GlossaryCache $glossaryCache |
||
68 | */ |
||
69 | 7 | public function setCache( GlossaryCache $glossaryCache ) { |
|
72 | |||
73 | /** |
||
74 | * @since 1.0 |
||
75 | * |
||
76 | * @param Store $store |
||
77 | * @param SemanticData $semanticData |
||
78 | * |
||
79 | * @return boolean |
||
80 | */ |
||
81 | 6 | public function invalidateCacheOnStoreUpdate( Store $store, SemanticData $semanticData = null ) { |
|
96 | |||
97 | /** |
||
98 | * @since 1.0 |
||
99 | * |
||
100 | * @param Store $store |
||
101 | * @param DIWikiPage $subject |
||
102 | * @param boolean|true $purgeLingo |
||
103 | * |
||
104 | * @return boolean |
||
105 | */ |
||
106 | 3 | public function invalidateCacheOnPageDelete( Store $store, DIWikiPage $subject, $purgeLingo = true ) { |
|
117 | |||
118 | /** |
||
119 | * @since 1.0 |
||
120 | * |
||
121 | * @param LinkTarget $title |
||
122 | * |
||
123 | * @return boolean |
||
124 | */ |
||
125 | 1 | public function invalidateCacheOnPageMove( LinkTarget $title ) { |
|
129 | |||
130 | 5 | private function matchAllSubobjects( Store $store, SemanticData $semanticData ) { |
|
144 | |||
145 | 3 | private function matchSubobjectsToSubject( Store $store, DIWikiPage $subject ) { |
|
159 | |||
160 | 5 | private function hasSemanticDataDeviation( Store $store, SemanticData $semanticData ) { |
|
169 | |||
170 | 6 | private function purgeCache( DIWikiPage $subject ) { |
|
178 | |||
179 | } |
||
180 |
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: