MediaWiki
REL1_20
|
Maintenance script that compares documented and actually present mismatches. More...
Public Member Functions | |
__construct () | |
Default constructor. | |
execute () | |
Do the actual work. | |
getDbType () | |
Does the script need different DB access? By default, we give Maintenance scripts normal rights to the DB. | |
Private Member Functions | |
getBadHooksFromFile ($file) | |
Get bad hooks (where the hook name could not be determined) from a PHP file. | |
getBadHooksFromPath ($path) | |
Get bad hooks from the source code. | |
getHooksFromDoc ($doc) | |
Get the hook documentation, either locally or from MediaWiki.org. | |
getHooksFromFile ($file) | |
Get hooks from a PHP file. | |
getHooksFromLocalDoc ($doc) | |
Get hooks from a local file (for example docs/hooks.txt) | |
getHooksFromOnlineDoc () | |
Get hooks from www.mediawiki.org using the API. | |
getHooksFromPath ($path) | |
Get hooks from the source code. | |
printArray ($msg, $arr, $sort=true) | |
Nicely output the array. |
Maintenance script that compares documented and actually present mismatches.
Definition at line 44 of file findHooks.php.
Default constructor.
Children should call this *first* if implementing their own constructors
Reimplemented from Maintenance.
Definition at line 45 of file findHooks.php.
References Maintenance\addOption().
Do the actual work.
All child classes will need to implement this
Reimplemented from Maintenance.
Definition at line 55 of file findHooks.php.
References $dir, $IP, getBadHooksFromPath(), getHooksFromDoc(), getHooksFromPath(), Maintenance\output(), and printArray().
FindHooks::getBadHooksFromFile | ( | $ | file | ) | [private] |
Get bad hooks (where the hook name could not be determined) from a PHP file.
$file | string Full filename to the PHP file. |
Definition at line 201 of file findHooks.php.
References $file.
Referenced by getBadHooksFromPath().
FindHooks::getBadHooksFromPath | ( | $ | path | ) | [private] |
Get bad hooks from the source code.
$path | Directory where the include files can be found |
Definition at line 218 of file findHooks.php.
References $file, $path, and getBadHooksFromFile().
Referenced by execute().
Does the script need different DB access? By default, we give Maintenance scripts normal rights to the DB.
Sometimes, a script needs admin rights access for a reason and sometimes they want no access. Subclasses should override and return one of the following values, as needed: Maintenance::DB_NONE - For no DB access at all Maintenance::DB_STD - For normal DB access, default Maintenance::DB_ADMIN - For admin DB access
Reimplemented from Maintenance.
Definition at line 51 of file findHooks.php.
References Maintenance\DB_NONE.
FindHooks::getHooksFromDoc | ( | $ | doc | ) | [private] |
Get the hook documentation, either locally or from MediaWiki.org.
Definition at line 115 of file findHooks.php.
References getHooksFromLocalDoc(), getHooksFromOnlineDoc(), and Maintenance\hasOption().
Referenced by execute().
FindHooks::getHooksFromFile | ( | $ | file | ) | [private] |
Get hooks from a PHP file.
$file | string Full filename to the PHP file. |
Definition at line 170 of file findHooks.php.
References $file.
Referenced by getHooksFromPath().
FindHooks::getHooksFromLocalDoc | ( | $ | doc | ) | [private] |
Get hooks from a local file (for example docs/hooks.txt)
$doc | string: filename to look in |
Definition at line 128 of file findHooks.php.
Referenced by getHooksFromDoc().
FindHooks::getHooksFromOnlineDoc | ( | ) | [private] |
Get hooks from www.mediawiki.org using the API.
Definition at line 139 of file findHooks.php.
References $matches, $page, and Http\get().
Referenced by getHooksFromDoc().
FindHooks::getHooksFromPath | ( | $ | path | ) | [private] |
Get hooks from the source code.
$path | Directory where the include files can be found |
Definition at line 182 of file findHooks.php.
References $file, $path, and getHooksFromFile().
Referenced by execute().
FindHooks::printArray | ( | $ | msg, |
$ | arr, | ||
$ | sort = true |
||
) | [private] |
Nicely output the array.
$msg | String: a message to show before the value |
$arr | Array: an array |
$sort | Boolean: whether to sort the array (Default: true) |
Definition at line 239 of file findHooks.php.
References Maintenance\output().
Referenced by execute().