Go to the source code of this file.
Functions | |
| getHooksFromDoc () | |
| getHooksFromFile ($file) | |
| Get hooks from a PHP file. | |
| getHooksFromPath ($path) | |
| Get hooks from the source code. | |
| 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. | |
| printArray ($msg, $arr, $sort=true) | |
| Nicely output the array. | |
Variables | |
| $doc = $IP . '/docs/hooks.txt' | |
| This is a command line script. | |
| $pathinc | |
| $documented = getHooksFromDoc($doc) | |
| $potential = array() | |
| $bad = array() | |
| $todo = array_diff( $potential, $documented ) | |
| $deprecated = array_diff( $documented, $potential ) | |
This script assumes that:
if --online option is passed, the script will compare the hooks in the code with the ones at http://www.mediawiki.org/wiki/Manual:Hooks
Any instance of wfRunHooks that doesn't meet these parameters will be noted.
Definition in file findhooks.php.
| getBadHooksFromFile | ( | $ | file | ) |
Get bad hooks (where the hook name could not be determined) from a PHP file.
| $file | Full filename to the PHP file. |
Definition at line 95 of file findhooks.php.
References $file.
Referenced by getBadHooksFromPath().
| getBadHooksFromPath | ( | $ | path | ) |
Get bad hooks from the source code.
| $path | Directory where the include files can be found |
Definition at line 112 of file findhooks.php.
References $file, $path, and getBadHooksFromFile().
| getHooksFromDoc | ( | ) |
Definition at line 47 of file findhooks.php.
References $doc, $options, and Http::get().
| getHooksFromFile | ( | $ | file | ) |
Get hooks from a PHP file.
| $file | Full filename to the PHP file. |
Definition at line 65 of file findhooks.php.
References $file.
Referenced by getHooksFromPath().
| getHooksFromPath | ( | $ | path | ) |
Get hooks from the source code.
| $path | Directory where the include files can be found |
Definition at line 77 of file findhooks.php.
References $file, $path, and getHooksFromFile().
| printArray | ( | $ | msg, | |
| $ | arr, | |||
| $ | sort = true | |||
| ) |
Nicely output the array.
| $msg | A message to show before the value | |
| $arr | An array | |
| $sort | Boolean : wheter to sort the array (Default: true) |
Definition at line 132 of file findhooks.php.
References $sort.
| $bad = array() |
| $deprecated = array_diff( $documented, $potential ) |
Definition at line 150 of file findhooks.php.
| $doc = $IP . '/docs/hooks.txt' |
This is a command line script.
Definition at line 27 of file findhooks.php.
Referenced by getHooksFromDoc().
| $documented = getHooksFromDoc($doc) |
Definition at line 139 of file findhooks.php.
| $pathinc |
| foreach ($pathinc as $dir) $potential = array() |
Definition at line 140 of file findhooks.php.
| $todo = array_diff( $potential, $documented ) |
1.5.9