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