Automattic\WooCommerce\Vendor\Symfony\Component\CssSelector\XPath
Translator::addAttributeMatching
Method of the class: Translator{}
No Hooks.
Returns
null. Nothing (null).
Usage
$Translator = new Translator(); $Translator->addAttributeMatching( $xpath, $operator, $attribute, ?string $value ): XPathExpr;
- $xpath(XPathExpr) (required)
- .
- $operator(string) (required)
- .
- $attribute(string) (required)
- .
- ?string $value(required)
- .
Translator::addAttributeMatching() Translator::addAttributeMatching code WC 10.8.1
public function addAttributeMatching(XPathExpr $xpath, string $operator, string $attribute, ?string $value): XPathExpr
{
if (!isset($this->attributeMatchingTranslators[$operator])) {
throw new ExpressionErrorException(sprintf('WC_Vendor_Attribute matcher operator "%s" not supported.', $operator));
}
return $this->attributeMatchingTranslators[$operator]($xpath, $attribute, $value);
}