function ZfExtensionManagerSfContainer::setStandalone
Same name in this branch
- 9 core/modules/aggregator/src/ZfExtensionManagerSfContainer.php \Drupal\aggregator\ZfExtensionManagerSfContainer::setStandalone()
Same name in other branches
- 8.9.x core/lib/Drupal/Component/Bridge/ZfExtensionManagerSfContainer.php \Drupal\Component\Bridge\ZfExtensionManagerSfContainer::setStandalone()
Parameters
$class: The class to set as standalone.
File
-
core/
lib/ Drupal/ Component/ Bridge/ ZfExtensionManagerSfContainer.php, line 130
Class
- ZfExtensionManagerSfContainer
- Defines a bridge between the Laminas service manager to Symfony container.
Namespace
Drupal\Component\BridgeCode
public function setStandalone($class) {
if (!is_subclass_of($class, ReaderManagerInterface::class) && !is_subclass_of($class, WriterManagerInterface::class)) {
throw new \RuntimeException("{$class} must implement Laminas\\Feed\\Reader\\ExtensionManagerInterface or Laminas\\Feed\\Writer\\ExtensionManagerInterface");
}
$this->standalone = new $class();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.