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