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

Breadcrumb

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

class IdentifierHandler

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\IdentifierHandler implements \Symfony\Component\CssSelector\Parser\Handler\HandlerInterface

Expanded class hierarchy of IdentifierHandler

See also

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

File

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

Namespace

Symfony\Component\CssSelector\Parser\Handler
View source
class IdentifierHandler implements HandlerInterface {
    public function __construct(TokenizerPatterns $patterns, TokenizerEscaping $escaping) {
    }
    public function handle(Reader $reader, TokenStream $stream) : bool {
        $match = $reader->findPattern($this->patterns
            ->getIdentifierPattern());
        if (!$match) {
            return false;
        }
        $value = $this->escaping
            ->escapeUnicode($match[0]);
        $stream->push(new Token(Token::TYPE_IDENTIFIER, $value, $reader->getPosition()));
        $reader->moveForward(\strlen($match[0]));
        return true;
    }

}

Members

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

API Navigation

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