/**
* Fill in the defaults for any parameters missing from $params, using the
* backwards-compatible global variables
+ * @param array $params
+ * @return array
*/
protected function applyDefaultParams( $params ) {
if ( !isset( $params['servers'] ) ) {
}
/**
- * @param $key string
- * @param $casToken[optional] mixed
- * @return Mixed
+ * @param string $key
+ * @param mixed $casToken [optional]
+ * @return mixed
*/
public function get( $key, &$casToken = null ) {
return $this->client->get( $this->encodeKey( $key ), $casToken );
}
/**
- * @param $key string
- * @param $value
- * @param $exptime int
+ * @param string $key
+ * @param mixed $value
+ * @param int $exptime
* @return bool
*/
public function set( $key, $value, $exptime = 0 ) {
}
/**
- * @param $key string
- * @param $casToken mixed
- * @param $value
- * @param $exptime int
+ * @param mixed $casToken
+ * @param string $key
+ * @param mixed $value
+ * @param int $exptime
* @return bool
*/
public function cas( $casToken, $key, $value, $exptime = 0 ) {
}
/**
- * @param $key string
- * @param $time int
+ * @param string $key
+ * @param int $time
* @return bool
*/
public function delete( $key, $time = 0 ) {
}
/**
- * @param $key string
- * @param $value int
+ * @param string $key
+ * @param int $value
* @param int $exptime (default 0)
- * @return Mixed
+ * @return mixed
*/
public function add( $key, $value, $exptime = 0 ) {
return $this->client->add( $this->encodeKey( $key ), $value,
/**
* Get the underlying client object. This is provided for debugging
* purposes.
+ * @return BagOStuff
*/
public function getClient() {
return $this->client;
* the other control characters for compatibility with libmemcached
* verify_key. We leave other punctuation alone, to maximise backwards
* compatibility.
- * @param $key string
+ * @param string $key
* @return string
*/
public function encodeKey( $key ) {
}
/**
- * @param $m array
+ * @param array $m
* @return string
*/
protected function encodeKeyCallback( $m ) {
* discarded immediately because the expiry is in the past.
* Clamp expiries >30d at 30d, unless they're >=1e9 in which
* case they are likely to really be absolute (1e9 = 2011-09-09)
+ * @param int $expiry
+ * @return int
*/
function fixExpiry( $expiry ) {
if ( $expiry > 2592000 && $expiry < 1000000000 ) {
* Decode a key encoded with encodeKey(). This is provided as a convenience
* function for debugging.
*
- * @param $key string
+ * @param string $key
*
* @return string
*/
/**
* Send a debug message to the log
+ * @param string $text
*/
protected function debugLog( $text ) {
wfDebugLog( 'memcached', $text );