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