Automattic\WooCommerce\Vendor\Symfony\Component\CssSelector\XPath\Extension

NodeExtension::isSafeNameprivateWC 1.0

Method of the class: NodeExtension{}

No Hooks.

Returns

null. Nothing (null).

Usage

// private - for code of main (parent) class only
$result = $this->isSafeName( $name ): bool;
$name(string) (required)
.

NodeExtension::isSafeName() code WC 10.5.0

private function isSafeName(string $name): bool
{
    return 0 < preg_match('~^[a-zA-Z_][a-zA-Z0-9_.-]*$~', $name);
}