diff --git a/laravel/memcached.php b/laravel/memcached.php index bcb9e911..6d8c8fd6 100644 --- a/laravel/memcached.php +++ b/laravel/memcached.php @@ -59,4 +59,20 @@ public static function connect($servers) return $memcache; } + /** + * Dynamically pass all other method calls to the Memcache instance. + * + * + * // Get an item from the Memcache instance + * $name = Memcached::get('name'); + * + * // Store data on the Memcache server + * Memcached::set('name', 'Taylor'); + * + */ + public static function __callStatic($method, $parameters) + { + return call_user_func_array(array(static::instance(), $method), $parameters); + } + } \ No newline at end of file