From 4e90bd4e3060c148e7aa87e8137adcf30d5ba876 Mon Sep 17 00:00:00 2001 From: tstoeckler Date: Fri, 22 Aug 2014 01:27:17 +0200 Subject: [PATCH] Add __call() to XcacheClassLoader XcacheClassLoader does not implement __call() to forward methods (such as addPsr4()) to the decorated object. I think this is an oversight, although I might be missing something. I just copied the code over from ApcClassLoader, which does implement __call(). This allows to use XcacheClassLoader with Drupal 8, as the addPsr4() method is used there. --- XcacheClassLoader.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/XcacheClassLoader.php b/XcacheClassLoader.php index 299a79a..49f495e 100644 --- a/XcacheClassLoader.php +++ b/XcacheClassLoader.php @@ -122,4 +122,13 @@ public function findFile($class) return $file; } + + /** + * Passes through all unknown calls onto the decorated object. + */ + public function __call($method, $args) + { + return call_user_func_array(array($this->classFinder, $method), $args); + } + }