public function WhitespaceHandler::handle in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/css-selector/Parser/Handler/WhitespaceHandler.php \Symfony\Component\CssSelector\Parser\Handler\WhitespaceHandler::handle()
Parameters
Reader $reader:
TokenStream $stream:
Return value
bool
Overrides HandlerInterface::handle
File
- vendor/
symfony/ css-selector/ Parser/ Handler/ WhitespaceHandler.php, line 31
Class
- WhitespaceHandler
- CSS selector whitespace handler.
Namespace
Symfony\Component\CssSelector\Parser\HandlerCode
public function handle(Reader $reader, TokenStream $stream) {
$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;
}