Automattic\WooCommerce\Vendor\Symfony\Component\CssSelector\Parser\Handler
WhitespaceHandler::handle
{@inheritdoc}
Method of the class: WhitespaceHandler{}
No Hooks.
Returns
null. Nothing (null).
Usage
$WhitespaceHandler = new WhitespaceHandler(); $WhitespaceHandler->handle( $reader, $stream ): bool;
- $reader(Reader) (required)
- .
- $stream(TokenStream) (required)
- .
WhitespaceHandler::handle() WhitespaceHandler::handle code WC 11.0.1
public function handle(Reader $reader, TokenStream $stream): bool
{
$match = $reader->findPattern('~^[ \t\r\n\f]+~');
if (false === $match) {
return false;
}
$stream->push(new Token(Token::TYPE_WHITESPACE, $match[0], $reader->getPosition()));
$reader->moveForward(\strlen($match[0]));
return true;
}