Chris@0: pluginManager = $pluginManager; Chris@0: } Chris@0: Chris@0: /** Chris@0: * Method overloading Chris@0: * Chris@0: * Proxy to composed ExtensionManagerInterface instance. Chris@0: * Chris@0: * @param string $method Chris@0: * @param array $args Chris@0: * @return mixed Chris@0: * @throws Exception\BadMethodCallException Chris@0: */ Chris@0: public function __call($method, $args) Chris@0: { Chris@12: if (! method_exists($this->pluginManager, $method)) { Chris@0: throw new Exception\BadMethodCallException(sprintf( Chris@0: 'Method by name of %s does not exist in %s', Chris@0: $method, Chris@0: __CLASS__ Chris@0: )); Chris@0: } Chris@0: return call_user_func_array([$this->pluginManager, $method], $args); Chris@0: } Chris@0: Chris@0: /** Chris@0: * Get the named extension Chris@0: * Chris@0: * @param string $name Chris@0: * @return Extension\AbstractRenderer Chris@0: */ Chris@0: public function get($name) Chris@0: { Chris@0: return $this->pluginManager->get($name); Chris@0: } Chris@0: Chris@0: /** Chris@0: * Do we have the named extension? Chris@0: * Chris@0: * @param string $name Chris@0: * @return bool Chris@0: */ Chris@0: public function has($name) Chris@0: { Chris@0: return $this->pluginManager->has($name); Chris@0: } Chris@0: }