You are here

public function CommentHandler::handle in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/symfony/css-selector/Parser/Handler/CommentHandler.php \Symfony\Component\CssSelector\Parser\Handler\CommentHandler::handle()

Parameters

Reader $reader:

TokenStream $stream:

Return value

bool

Overrides HandlerInterface::handle

File

vendor/symfony/css-selector/Parser/Handler/CommentHandler.php, line 30

Class

CommentHandler
CSS selector comment handler.

Namespace

Symfony\Component\CssSelector\Parser\Handler

Code

public function handle(Reader $reader, TokenStream $stream) {
  if ('/*' !== $reader
    ->getSubstring(2)) {
    return false;
  }
  $offset = $reader
    ->getOffset('*/');
  if (false === $offset) {
    $reader
      ->moveToEnd();
  }
  else {
    $reader
      ->moveForward($offset + 2);
  }
  return true;
}