| 1 | <?php |
||
| 8 | class Search extends Wikipedia |
||
| 9 | { |
||
| 10 | |||
| 11 | public function __construct() |
||
| 15 | |||
| 16 | /** |
||
| 17 | * Perform wiki search through MediaWiki action API. |
||
| 18 | * |
||
| 19 | * @param string $what The search string |
||
| 20 | * |
||
| 21 | * @return json object containing result if successful or |
||
| 22 | * error message & code if failed. |
||
| 23 | */ |
||
| 24 | function wikiSearch($what) |
||
| 48 | |||
| 49 | } |
||
| 50 |
Adding explicit visibility (
private,protected, orpublic) is generally recommend to communicate to other developers how, and from where this method is intended to be used.