Update Composer, update everything
This commit is contained in:
parent
ea3e94409f
commit
dda5c284b6
19527 changed files with 1135420 additions and 351004 deletions
|
|
@ -4,6 +4,7 @@ namespace Drupal\Component\Bridge;
|
|||
|
||||
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
|
||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||
use Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException;
|
||||
use Zend\Feed\Reader\ExtensionManagerInterface as ReaderManagerInterface;
|
||||
use Zend\Feed\Writer\ExtensionManagerInterface as WriterManagerInterface;
|
||||
|
||||
|
|
@ -48,6 +49,11 @@ class ZfExtensionManagerSfContainer implements ReaderManagerInterface, WriterMan
|
|||
*/
|
||||
protected $canonicalNames;
|
||||
|
||||
/**
|
||||
* @var \Zend\Feed\Reader\ExtensionManagerInterface|\Zend\Feed\Writer\ExtensionManagerInterface
|
||||
*/
|
||||
protected $standalone;
|
||||
|
||||
/**
|
||||
* Constructs a ZfExtensionManagerSfContainer object.
|
||||
*
|
||||
|
|
@ -62,14 +68,25 @@ class ZfExtensionManagerSfContainer implements ReaderManagerInterface, WriterMan
|
|||
* {@inheritdoc}
|
||||
*/
|
||||
public function get($extension) {
|
||||
return $this->container->get($this->prefix . $this->canonicalizeName($extension));
|
||||
try {
|
||||
return $this->container->get($this->prefix . $this->canonicalizeName($extension));
|
||||
}
|
||||
catch (ServiceNotFoundException $e) {
|
||||
if ($this->standalone && $this->standalone->has($extension)) {
|
||||
return $this->standalone->get($extension);
|
||||
}
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function has($extension) {
|
||||
return $this->container->has($this->prefix . $this->canonicalizeName($extension));
|
||||
if ($this->container->has($this->prefix . $this->canonicalizeName($extension))) {
|
||||
return TRUE;
|
||||
}
|
||||
return $this->standalone && $this->standalone->has($extension);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -102,4 +119,14 @@ class ZfExtensionManagerSfContainer implements ReaderManagerInterface, WriterMan
|
|||
$this->container = $container;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $class
|
||||
*/
|
||||
public function setStandalone($class) {
|
||||
if (!is_subclass_of($class, ReaderManagerInterface::class) && !is_subclass_of($class, WriterManagerInterface::class)) {
|
||||
throw new \RuntimeException("$class must implement Zend\Feed\Reader\ExtensionManagerInterface or Zend\Feed\Writer\ExtensionManagerInterface");
|
||||
}
|
||||
$this->standalone = new $class();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,10 +3,10 @@
|
|||
"description": "Bridge.",
|
||||
"keywords": ["drupal"],
|
||||
"homepage": "https://www.drupal.org/project/drupal",
|
||||
"license": "GPL-2.0+",
|
||||
"license": "GPL-2.0-or-later",
|
||||
"require": {
|
||||
"php": ">=5.5.9",
|
||||
"zendframework/zend-feed": "~2.4"
|
||||
"zendframework/zend-feed": "^2.4"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
|
|
|
|||
Reference in a new issue