added callStatic method to Memcached class.

This commit is contained in:
Taylor Otwell 2011-11-16 19:48:08 -06:00
parent 060e1f64b8
commit 980caf31da
1 changed files with 16 additions and 0 deletions

View File

@ -59,4 +59,20 @@ public static function connect($servers)
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);
}
}