Automattic\WooCommerce\Vendor\Symfony\Component\CssSelector\XPath\Extension
AttributeMatchingExtension::translateDifferent
Метод класса: AttributeMatchingExtension{}
Хуков нет.
Возвращает
null. Ничего (null).
Использование
$AttributeMatchingExtension = new AttributeMatchingExtension(); $AttributeMatchingExtension->translateDifferent( $xpath, $attribute, ?string $value ): XPathExpr;
- $xpath(XPathExpr) (обязательный)
- .
- $attribute(строка) (обязательный)
- .
- ?string $value(обязательный)
- .
Код AttributeMatchingExtension::translateDifferent() AttributeMatchingExtension::translateDifferent WC 10.5.1
public function translateDifferent(XPathExpr $xpath, string $attribute, ?string $value): XPathExpr
{
return $xpath->addCondition(sprintf(
$value ? 'not(%1$s) or %1$s != %2$s' : '%s != %s',
$attribute,
Translator::getXpathLiteral($value)
));
}