Translator::selectorToXPath()

string selectorToXPath(SelectorNode $selector, string $prefix = 'descendant-or-self::') Translates a parsed selector node to an XPath expression. Parameters SelectorNode $selector string $prefix Return Value string

Translator::registerParserShortcut()

Translator registerParserShortcut(ParserInterface $shortcut) Registers a shortcut parser. Parameters ParserInterface $shortcut Return Value Translator

Translator::registerExtension()

Translator registerExtension(ExtensionInterface $extension) Registers an extension. Parameters ExtensionInterface $extension Return Value Translator

Translator::nodeToXPath()

XPathExpr nodeToXPath(NodeInterface $node) Parameters NodeInterface $node Return Value XPathExpr Exceptions ExpressionErrorException

Translator::getXpathLiteral()

static string getXpathLiteral(string $element) Parameters string $element Return Value string

Translator::getLocale()

string getLocale() Returns the current locale. Return Value string The locale

Translator::getFallbackLocales()

array getFallbackLocales() Gets the fallback locales. Return Value array $locales The fallback locales

Translator::getExtension()

ExtensionInterface getExtension(string $name) Parameters string $name Return Value ExtensionInterface Exceptions ExpressionErrorException

Translator::getCatalogue()

MessageCatalogueInterface getCatalogue(string|null $locale = null) Gets the catalogue by locale. Parameters string|null $locale The locale or null to use the default Return Value MessageCatalogueInterface Exceptions InvalidArgumentException If the locale contains invalid characters

Translator::cssToXPath()

string cssToXPath(string $cssExpr, string $prefix = 'descendant-or-self::') Translates a CSS selector to an XPath expression. Parameters string $cssExpr string $prefix Return Value string