Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. CommentHandler.php

class CommentHandler

CSS selector comment handler.

This component is a port of the Python cssselect library, which is copyright Ian Bicking, @author Jean-François Simon <jeanfrancois.simon@sensiolabs.com>

@internal

Hierarchy

  • class \Symfony\Component\CssSelector\Parser\Handler\CommentHandler implements \Symfony\Component\CssSelector\Parser\Handler\HandlerInterface

Expanded class hierarchy of CommentHandler

See also

https://github.com/SimonSapin/cssselect.

File

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

Namespace

Symfony\Component\CssSelector\Parser\Handler
View source
class CommentHandler implements HandlerInterface {
    public function handle(Reader $reader, TokenStream $stream) : bool {
        if ('/*' !== $reader->getSubstring(2)) {
            return false;
        }
        $offset = $reader->getOffset('*/');
        if (false === $offset) {
            $reader->moveToEnd();
        }
        else {
            $reader->moveForward($offset + 2);
        }
        return true;
    }

}

Members

Title Sort descending Modifiers Object type Summary Overriden Title
CommentHandler::handle public function Overrides HandlerInterface::handle

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal