1 | <?php |
||
16 | class PageDeleter extends Service { |
||
17 | |||
18 | /** |
||
19 | * @since 0.2 |
||
20 | * |
||
21 | * @param Page $page |
||
22 | * @param array $extraParams |
||
23 | * |
||
24 | * @return bool |
||
25 | */ |
||
26 | public function delete( Page $page, array $extraParams = [] ) { |
||
33 | |||
34 | /** |
||
35 | * @since 0.2 |
||
36 | * |
||
37 | * @param Revision $revision |
||
38 | * @param array $extraParams |
||
39 | * |
||
40 | * @return bool |
||
41 | */ |
||
42 | public function deleteFromRevision( Revision $revision, array $extraParams = [] ) { |
||
49 | |||
50 | /** |
||
51 | * @since 0.2 |
||
52 | * |
||
53 | * @param int $pageid |
||
54 | * @param array $extraParams |
||
55 | * |
||
56 | * @return bool |
||
57 | */ |
||
58 | public function deleteFromPageId( $pageid, array $extraParams = [] ) { |
||
65 | |||
66 | /** |
||
67 | * @since 0.5 |
||
68 | * |
||
69 | * @param Title|string $title |
||
70 | * @param array $extraParams |
||
71 | * |
||
72 | * @return bool |
||
73 | */ |
||
74 | public function deleteFromPageTitle( $title, array $extraParams = [] ) { |
||
84 | |||
85 | /** |
||
86 | * @param PageIdentifier $identifier |
||
87 | * @param array $extraParams |
||
88 | * |
||
89 | * @return array |
||
90 | */ |
||
91 | private function getDeleteParams( PageIdentifier $identifier, $extraParams ) { |
||
104 | |||
105 | } |
||
106 |
Unless you are absolutely sure that the expression can never be null because of other conditions, we strongly recommend to add an additional type check to your code: