* Attach an event handler to a given hook.
*
* @param string $name Name of hook
- * @param mixed $callback Callback function to attach
+ * @param callable $callback Callback function to attach
*
* @since 1.18
*/
* @param BagOStuff $cache A cache object such as $wgMemc
* @param string $key The cache key
* @param int $expiry The expiry timestamp or interval in seconds
- * @param bool|array $callback The callback for generating the value, or false
+ * @param bool|callable $callback The callback for generating the value, or false
* @param array $callbackParams The function parameters for the callback
* @param array $deps The dependencies to store on a cache miss. Note: these
* are not the dependencies used on a cache hit! Cache hits use the stored
}
/**
- * @param string|array $callback
+ * @param string|callable $callback
* @param array $params
*/
function forEachLB( $callback, $params = array() ) {
/**
* @param FSFileBackend $backend
* @param array $params
- * @param callback $call
+ * @param callable $call
* @param string $cmd
* @param int|null $chmodPath
*/
* This only acts on the current version of files, not any old versions.
* May use either the database or the filesystem.
*
- * @param array|string $callback
+ * @param callable $callback
* @return void
*/
public function enumFiles( $callback ) {
* Call a callback function for every public file in the repository.
* May use either the database or the filesystem.
*
- * @param array|string $callback
+ * @param callable $callback
* @return void
*/
protected function enumFilesInStorage( $callback ) {
}
/**
- * @param array|string $callback
+ * @param callable $callback
* @throws MWException
*/
function enumFiles( $callback ) {
/**
* Actually perform the installation.
*
- * @param array $startCB A callback array for the beginning of each step
- * @param array $endCB A callback array for the end of each step
+ * @param callable $startCB A callback array for the beginning of each step
+ * @param callable $endCB A callback array for the end of each step
*
* @return array Array of Status objects
*/
/**
* Add an installation step following the given step.
*
- * @param array $callback A valid installation callback array, in this form:
+ * @param callable $callback A valid installation callback array, in this form:
* array( 'name' => 'some-unique-name', 'callback' => array( $obj, 'function' ) );
* @param string $findStep The step to find. Omit to put the step at the beginning
*/
* private variables.**
*
* @param string $tag The tag to use, e.g. 'hook' for "<hook>"
- * @param mixed $callback The callback function (and object) to use for the tag
+ * @param callable $callback The callback function (and object) to use for the tag
* @throws MWException
- * @return mixed|null The old value of the mTagHooks array associated with the hook
+ * @return callable|null The old value of the mTagHooks array associated with the hook
*/
public function setHook( $tag, $callback ) {
$tag = strtolower( $tag );
* @todo better document or deprecate this
*
* @param string $tag The tag to use, e.g. 'hook' for "<hook>"
- * @param mixed $callback The callback function (and object) to use for the tag
+ * @param callable $callback The callback function (and object) to use for the tag
* @throws MWException
- * @return mixed|null The old value of the mTagHooks array associated with the hook
+ * @return callable|null The old value of the mTagHooks array associated with the hook
*/
function setTransparentTagHook( $tag, $callback ) {
$tag = strtolower( $tag );
* isHTML The returned text is HTML, armour it against wikitext transformation
*
* @param string $id The magic word ID
- * @param mixed $callback The callback function (and object) to use
+ * @param callable $callback The callback function (and object) to use
* @param int $flags A combination of the following flags:
* SFH_NO_HASH No leading hash, i.e. {{plural:...}} instead of {{#if:...}}
*