Automattic\WooCommerce\Vendor\Symfony\Component\CssSelector\Parser\Handler

IdentifierHandler::handlepublicWC 1.0

{@inheritdoc}

Method of the class: IdentifierHandler{}

No Hooks.

Returns

null. Nothing (null).

Usage

$IdentifierHandler = new IdentifierHandler();
$IdentifierHandler->handle( $reader, $stream ): bool;
$reader(Reader) (required)
.
$stream(TokenStream) (required)
.

IdentifierHandler::handle() code WC 10.4.3

public function handle(Reader $reader, TokenStream $stream): bool
{
    $match = $reader->findPattern($this->patterns->getIdentifierPattern());

    if (!$match) {
        return false;
    }

    $value = $this->escaping->escapeUnicode($match[0]);
    $stream->push(new Token(Token::TYPE_IDENTIFIER, $value, $reader->getPosition()));
    $reader->moveForward(\strlen($match[0]));

    return true;
}