Commit 980caf31 authored by Taylor Otwell's avatar Taylor Otwell

added callStatic method to Memcached class.

parent 060e1f64
......@@ -59,4 +59,20 @@ class Memcached {
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);
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment