public function NumberHandler::handle in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/css-selector/Parser/Handler/NumberHandler.php \Symfony\Component\CssSelector\Parser\Handler\NumberHandler::handle()
Parameters
Reader $reader:
TokenStream $stream:
Return value
bool
Overrides HandlerInterface::handle
File
- vendor/
symfony/ css-selector/ Parser/ Handler/ NumberHandler.php, line 45
Class
- NumberHandler
- CSS selector comment handler.
Namespace
Symfony\Component\CssSelector\Parser\HandlerCode
public function handle(Reader $reader, TokenStream $stream) {
$match = $reader
->findPattern($this->patterns
->getNumberPattern());
if (!$match) {
return false;
}
$stream
->push(new Token(Token::TYPE_NUMBER, $match[0], $reader
->getPosition()));
$reader
->moveForward(strlen($match[0]));
return true;
}