public function Translator::registerExtension in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/symfony/css-selector/XPath/Translator.php \Symfony\Component\CssSelector\XPath\Translator::registerExtension()
Registers an extension.
Parameters
Extension\ExtensionInterface $extension:
Return value
File
- vendor/
symfony/ css-selector/ XPath/ Translator.php, line 152
Class
- Translator
- XPath expression translator interface.
Namespace
Symfony\Component\CssSelector\XPathCode
public function registerExtension(Extension\ExtensionInterface $extension) {
$this->extensions[$extension
->getName()] = $extension;
$this->nodeTranslators = array_merge($this->nodeTranslators, $extension
->getNodeTranslators());
$this->combinationTranslators = array_merge($this->combinationTranslators, $extension
->getCombinationTranslators());
$this->functionTranslators = array_merge($this->functionTranslators, $extension
->getFunctionTranslators());
$this->pseudoClassTranslators = array_merge($this->pseudoClassTranslators, $extension
->getPseudoClassTranslators());
$this->attributeMatchingTranslators = array_merge($this->attributeMatchingTranslators, $extension
->getAttributeMatchingTranslators());
return $this;
}