This commit is contained in:
Nicolas Grekas 2019-08-20 13:59:54 +02:00
parent 3aceb6d3a2
commit 974b77e781

View File

@ -114,6 +114,9 @@ class Translator implements TranslatorInterface
return ($prefix ?: '').$this->nodeToXPath($selector);
}
/**
* @return $this
*/
public function registerExtension(Extension\ExtensionInterface $extension): self
{
$this->extensions[$extension->getName()] = $extension;
@ -139,6 +142,9 @@ class Translator implements TranslatorInterface
return $this->extensions[$name];
}
/**
* @return $this
*/
public function registerParserShortcut(ParserInterface $shortcut): self
{
$this->shortcutParsers[] = $shortcut;