/**
* Set a callback that displays notice messages
*
- * @param $callback callback
- * @return callback
+ * @param callable $callback
+ * @return callable
*/
public function setNoticeCallback( $callback ) {
return wfSetVar( $this->mNoticeCallback, $callback );
/**
* Sets the action to perform as each new page in the stream is reached.
- * @param $callback callback
- * @return callback
+ * @param callable $callback
+ * @return callable
*/
public function setPageCallback( $callback ) {
$previous = $this->mPageCallback;
* with the original title form (in case it's been overridden into a
* local namespace), and a count of revisions.
*
- * @param $callback callback
- * @return callback
+ * @param callable $callback
+ * @return callable
*/
public function setPageOutCallback( $callback ) {
$previous = $this->mPageOutCallback;
/**
* Sets the action to perform as each page revision is reached.
- * @param $callback callback
- * @return callback
+ * @param callable $callback
+ * @return callable
*/
public function setRevisionCallback( $callback ) {
$previous = $this->mRevisionCallback;
/**
* Sets the action to perform as each file upload version is reached.
- * @param $callback callback
- * @return callback
+ * @param callable $callback
+ * @return callable
*/
public function setUploadCallback( $callback ) {
$previous = $this->mUploadCallback;
/**
* Sets the action to perform as each log item reached.
- * @param $callback callback
- * @return callback
+ * @param callable $callback
+ * @return callable
*/
public function setLogItemCallback( $callback ) {
$previous = $this->mLogItemCallback;
/**
* Sets the action to perform when site info is encountered
- * @param $callback callback
- * @return callback
+ * @param callable $callback
+ * @return callable
*/
public function setSiteInfoCallback( $callback ) {
$previous = $this->mSiteInfoCallback;
*/
class MWCallableUpdate implements DeferrableUpdate {
/**
- * @var closure/callback
+ * @var Closure|callable
*/
private $callback;
/** @var array Map of container names to sharding config */
protected $shardViaHashLevels = array();
- /** @var callback Method to get the MIME type of files */
+ /** @var callable Method to get the MIME type of files */
protected $mimeCallback;
protected $maxFileSize = 4294967296; // integer bytes (4GiB)
/**
* @param string $key
- * @param closure $callback Callback method to be executed
+ * @param Closure $callback Callback method to be executed
* @param int $exptime Either an interval in seconds or a unix timestamp for expiry
* @param int $attempts The amount of times to attempt a merge in case of failure
* @return bool Success
*/
- public function merge( $key, closure $callback, $exptime = 0, $attempts = 10 ) {
+ public function merge( $key, Closure $callback, $exptime = 0, $attempts = 10 ) {
return $this->mergeViaLock( $key, $callback, $exptime, $attempts );
}
* and takes the arguments: (this BagOStuff object, cache key, current value).
*
* @param string $key
- * @param closure $callback Callback method to be executed
+ * @param Closure $callback Callback method to be executed
* @param int $exptime Either an interval in seconds or a unix timestamp for expiry
* @param int $attempts The amount of times to attempt a merge in case of failure
* @return bool Success
*/
- public function merge( $key, closure $callback, $exptime = 0, $attempts = 10 ) {
+ public function merge( $key, Closure $callback, $exptime = 0, $attempts = 10 ) {
return $this->mergeViaCas( $key, $callback, $exptime, $attempts );
}
* @see BagOStuff::merge()
*
* @param string $key
- * @param closure $callback Callback method to be executed
+ * @param Closure $callback Callback method to be executed
* @param int $exptime Either an interval in seconds or a unix timestamp for expiry
* @param int $attempts The amount of times to attempt a merge in case of failure
* @return bool Success
*/
- protected function mergeViaCas( $key, closure $callback, $exptime = 0, $attempts = 10 ) {
+ protected function mergeViaCas( $key, Closure $callback, $exptime = 0, $attempts = 10 ) {
do {
$casToken = null; // passed by reference
$currentValue = $this->get( $key, $casToken ); // get the old value
* @see BagOStuff::merge()
*
* @param string $key
- * @param closure $callback Callback method to be executed
+ * @param Closure $callback Callback method to be executed
* @param int $exptime Either an interval in seconds or a unix timestamp for expiry
* @param int $attempts The amount of times to attempt a merge in case of failure
* @return bool Success
*/
- protected function mergeViaLock( $key, closure $callback, $exptime = 0, $attempts = 10 ) {
+ protected function mergeViaLock( $key, Closure $callback, $exptime = 0, $attempts = 10 ) {
if ( !$this->lock( $key, 6 ) ) {
return false;
}
/**
* Delete all objects expiring before a certain date.
* @param string $date The reference date in MW format
- * @param callback|bool $progressCallback Optional, a function which will be called
+ * @param callable|bool $progressCallback Optional, a function which will be called
* regularly during long-running operations with the percentage progress
* as the first parameter.
*
/**
* @param string $key
- * @param closure $callback Callback method to be executed
+ * @param Closure $callback Callback method to be executed
* @param int $exptime Either an interval in seconds or a unix timestamp for expiry
* @param int $attempts The amount of times to attempt a merge in case of failure
* @return bool Success
*/
- public function merge( $key, closure $callback, $exptime = 0, $attempts = 10 ) {
+ public function merge( $key, Closure $callback, $exptime = 0, $attempts = 10 ) {
return true;
}
}
/**
* @param string $key
- * @param closure $callback Callback method to be executed
+ * @param Closure $callback Callback method to be executed
* @param int $exptime Either an interval in seconds or a unix timestamp for expiry
* @param int $attempts The amount of times to attempt a merge in case of failure
* @return bool Success
*/
- public function merge( $key, closure $callback, $exptime = 0, $attempts = 10 ) {
+ public function merge( $key, Closure $callback, $exptime = 0, $attempts = 10 ) {
return $this->doWrite( 'merge', $key, $callback, $exptime );
}
*
* Succeed if any of the child caches succeed.
* @param string $date
- * @param bool|callback $progressCallback
+ * @param bool|callable $progressCallback
* @return bool
*/
public function deleteObjectsExpiringBefore( $date, $progressCallback = false ) {
/**
* Delete objects from the database which expire before a certain date.
* @param string $timestamp
- * @param bool|callback $progressCallback
+ * @param bool|callable $progressCallback
* @return bool
*/
public function deleteObjectsExpiringBefore( $timestamp, $progressCallback = false ) {
* provide a way to perform CAS-like functionality.
*
* @param string $key
- * @param closure $callback Callback method to be executed
+ * @param Closure $callback Callback method to be executed
* @param int $exptime Either an interval in seconds or a unix timestamp for expiry
* @param int $attempts The amount of times to attempt a merge in case of failure
* @return bool Cuccess
*/
- public function merge( $key, closure $callback, $exptime = 0, $attempts = 10 ) {
+ public function merge( $key, Closure $callback, $exptime = 0, $attempts = 10 ) {
return $this->mergeViaLock( $key, $callback, $exptime, $attempts );
}
* about the methods available in PPFrame and PPNode.
*
* @throws MWException
- * @return string|callback The old callback function for this name, if any
+ * @return string|callable The old callback function for this name, if any
*/
public function setFunctionHook( $id, $callback, $flags = 0 ) {
global $wgContLang;
/**
* @since 1.20
*
- * @param callback $function
+ * @param callable $function
*
* @covers GenericArrayObject::getObjectType
*/