Symfony\Component\CssSelector\XPath\Extension
AttributeMatchingExtension::translateSuffixMatch() public WC 1.0
{} Это метод класса: AttributeMatchingExtension{}
Хуков нет.
Возвращает
XPathExpr.
Использование
$AttributeMatchingExtension = new AttributeMatchingExtension(); $AttributeMatchingExtension->translateSuffixMatch( $xpath, $attribute, $value );
- $xpath(XPathExpr) (обязательный)
- -
- $attribute(строка) (обязательный)
- -
- $value(строка) (обязательный)
- -
Код AttributeMatchingExtension::translateSuffixMatch() AttributeMatchingExtension::translateSuffixMatch WC 5.0.0
public function translateSuffixMatch(XPathExpr $xpath, $attribute, $value)
{
return $xpath->addCondition($value ? sprintf(
'%1$s and substring(%1$s, string-length(%1$s)-%2$s) = %3$s',
$attribute,
strlen($value) - 1,
Translator::getXpathLiteral($value)
) : '0');
}