1 | <?php |
||
16 | class PagePurger { |
||
17 | |||
18 | /** |
||
19 | * @var MediawikiApi |
||
20 | */ |
||
21 | private $api; |
||
22 | |||
23 | /** |
||
24 | * @param MediawikiApi $api |
||
25 | */ |
||
26 | 2 | public function __construct( MediawikiApi $api ) { |
|
27 | 2 | $this->api = $api; |
|
28 | 2 | } |
|
29 | |||
30 | /** |
||
31 | * @since 0.3 |
||
32 | * |
||
33 | * @param Page $page |
||
34 | * |
||
35 | * @return bool |
||
36 | */ |
||
37 | 1 | public function purge( Page $page ) { |
|
38 | 1 | $this->api->postRequest( |
|
39 | 1 | new SimpleRequest( 'purge', [ 'pageids' => $page->getId() ] ) |
|
|
|||
40 | 1 | ); |
|
41 | |||
42 | 1 | return true; |
|
43 | } |
||
44 | |||
45 | /** |
||
46 | * @since 0.6 |
||
47 | * |
||
48 | * @param ApiGenerator $generator |
||
49 | * |
||
50 | * @return bool |
||
51 | */ |
||
52 | public function purgeGenerator( ApiGenerator $generator ) { |
||
59 | |||
60 | } |
||
61 |
This method has been deprecated. The supplier of the class has supplied an explanatory message.
The explanatory message should give you some clue as to whether and when the method will be removed from the class and what other method or class to use instead.