class ExtensionManager in Zircon Profile 8.0
Same name in this branch
- 8.0 vendor/zendframework/zend-feed/src/Reader/ExtensionManager.php \Zend\Feed\Reader\ExtensionManager
- 8.0 vendor/zendframework/zend-feed/src/Writer/ExtensionManager.php \Zend\Feed\Writer\ExtensionManager
Same name and namespace in other branches
- 8 vendor/zendframework/zend-feed/src/Reader/ExtensionManager.php \Zend\Feed\Reader\ExtensionManager
Default implementation of ExtensionManagerInterface
Decorator of ExtensionPluginManager.
Hierarchy
- class \Zend\Feed\Reader\ExtensionManager implements ExtensionManagerInterface
Expanded class hierarchy of ExtensionManager
File
- vendor/
zendframework/ zend-feed/ src/ Reader/ ExtensionManager.php, line 17
Namespace
Zend\Feed\ReaderView source
class ExtensionManager implements ExtensionManagerInterface {
protected $pluginManager;
/**
* Constructor
*
* Seeds the extension manager with a plugin manager; if none provided,
* creates an instance.
*
* @param null|ExtensionPluginManager $pluginManager
*/
public function __construct(ExtensionPluginManager $pluginManager = null) {
if (null === $pluginManager) {
$pluginManager = new ExtensionPluginManager();
}
$this->pluginManager = $pluginManager;
}
/**
* Method overloading
*
* Proxy to composed ExtensionPluginManager instance.
*
* @param string $method
* @param array $args
* @return mixed
* @throws Exception\BadMethodCallException
*/
public function __call($method, $args) {
if (!method_exists($this->pluginManager, $method)) {
throw new Exception\BadMethodCallException(sprintf('Method by name of %s does not exist in %s', $method, __CLASS__));
}
return call_user_func_array([
$this->pluginManager,
$method,
], $args);
}
/**
* Get the named extension
*
* @param string $name
* @return Extension\AbstractEntry|Extension\AbstractFeed
*/
public function get($name) {
return $this->pluginManager
->get($name);
}
/**
* Do we have the named extension?
*
* @param string $name
* @return bool
*/
public function has($name) {
return $this->pluginManager
->has($name);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ExtensionManager:: |
protected | property | ||
ExtensionManager:: |
public | function |
Get the named extension Overrides ExtensionManagerInterface:: |
|
ExtensionManager:: |
public | function |
Do we have the named extension? Overrides ExtensionManagerInterface:: |
|
ExtensionManager:: |
public | function | Method overloading | |
ExtensionManager:: |
public | function | Constructor |