1 | <?php |
||
16 | class PagePurger extends Service { |
||
17 | |||
18 | /** |
||
19 | * @since 0.3 |
||
20 | * |
||
21 | * Purge a single page |
||
22 | * |
||
23 | * Purges a single page by submitting a |
||
24 | * 'purge' action to the mediawiki api |
||
25 | * with the parameter 'pageids' set to |
||
26 | * the singe page id |
||
27 | * |
||
28 | * @param Page $page the page that is going to be purged |
||
29 | * |
||
30 | * @return bool return true if the purge was successful |
||
31 | */ |
||
32 | public function purge( Page $page ) { |
||
48 | |||
49 | /** |
||
50 | * @since 0.7 |
||
51 | * |
||
52 | * Purge multiple pages |
||
53 | * |
||
54 | * Purges all the pages of the Pages object |
||
55 | * by submitting a 'purge' action to the mediawiki |
||
56 | * api with the parameter 'pageids' set to be the |
||
57 | * pages ids in multiple-value seperation. |
||
58 | * |
||
59 | * @param Pages $pages the pages that are going to be purged |
||
60 | * |
||
61 | * @return Pages the pages that have been purged successfully |
||
62 | */ |
||
63 | public function purgePages( Pages $pages ) { |
||
106 | |||
107 | /** |
||
108 | * @since 0.6 |
||
109 | * |
||
110 | * @param ApiGenerator $generator |
||
111 | * |
||
112 | * @return bool |
||
113 | */ |
||
114 | public function purgeGenerator( ApiGenerator $generator ) { |
||
121 | |||
122 | } |
||
123 |
In PHP, under loose comparison (like
==
, or!=
, orswitch
conditions), values of different types might be equal.For
integer
values, zero is a special case, in particular the following results might be unexpected: