FunctionExtension::translateNthOfType()

XPathExpr translateNthOfType(XPathExpr $xpath, FunctionNode $function) Parameters XPathExpr $xpath FunctionNode $function Return Value XPathExpr

FunctionExtension::getFunctionTranslators()

callable[] getFunctionTranslators() Returns function translators. Return Value callable[]

FunctionExtension::getName()

string getName() Returns extension name. Return Value string

FunctionExtension

class FunctionExtension extends AbstractExtension XPath expression translator function extension. This component is a port of the Python cssselect library, which is copyright Ian Bicking, see https://github.com/SimonSapin/cssselect. Methods callable[] getNodeTranslators() Returns node translators. from AbstractExtension callable[] getCombinationTranslators() Returns combination translators. from AbstractExtension callable[] getFunctionTranslators() Returns function translators.

FunctionExtension::translateLang()

XPathExpr translateLang(XPathExpr $xpath, FunctionNode $function) Parameters XPathExpr $xpath FunctionNode $function Return Value XPathExpr Exceptions ExpressionErrorException

FunctionExtension::translateContains()

XPathExpr translateContains(XPathExpr $xpath, FunctionNode $function) Parameters XPathExpr $xpath FunctionNode $function Return Value XPathExpr Exceptions ExpressionErrorException

FullTransformer::formatReplace()

string formatReplace(string $dateChars, DateTime $dateTime) Return the formatted ICU value for the matched date characters. Parameters string $dateChars The date characters to be replaced with a formatted ICU value DateTime $dateTime A DateTime object to be used to generate the formatted value Return Value string The formatted value Exceptions NotImplementedException When it encounters a not implemented date character

FullTransformer::getReverseMatchingRegExp()

string getReverseMatchingRegExp(string $pattern) Retrieve a regular expression to match with a formatted value. Parameters string $pattern The pattern to create the reverse matching regular expression Return Value string The reverse matching regular expression with named captures being formed by the transformer index in the $transformer array

FullTransformer::replaceQuoteMatch()

string replaceQuoteMatch(string $quoteMatch) Replaces single quotes at the start or end of a string with two single quotes. Parameters string $quoteMatch The string to replace the quotes Return Value string A string with the single quotes replaced

FullTransformer::parse()

int parse(DateTime $dateTime, string $value) Parse a pattern based string to a timestamp value. Parameters DateTime $dateTime A configured DateTime object to use to perform the date calculation string $value String to convert to a time value Return Value int The corresponding Unix timestamp Exceptions InvalidArgumentException When the value can not be matched with pattern