added callStatic method to Memcached class.
This commit is contained in:
parent
060e1f64b8
commit
980caf31da
|
@ -59,4 +59,20 @@ public static function connect($servers)
|
||||||
return $memcache;
|
return $memcache;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Dynamically pass all other method calls to the Memcache instance.
|
||||||
|
*
|
||||||
|
* <code>
|
||||||
|
* // Get an item from the Memcache instance
|
||||||
|
* $name = Memcached::get('name');
|
||||||
|
*
|
||||||
|
* // Store data on the Memcache server
|
||||||
|
* Memcached::set('name', 'Taylor');
|
||||||
|
* </code>
|
||||||
|
*/
|
||||||
|
public static function __callStatic($method, $parameters)
|
||||||
|
{
|
||||||
|
return call_user_func_array(array(static::instance(), $method), $parameters);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
Loading…
Reference in New Issue