WordPress at a glance
class is not described

Symfony\Component\CssSelector\Parser\Handler

CommentHandler{} WC 1.0

CSS selector comment handler.

This component is a port of the Python cssselect library, which is copyright Ian Bicking, @see https://github.com/SimonSapin/cssselect.

No Hooks.

Return

null. Nothing.

Usage

$CommentHandler = new CommentHandler();
// use class methods

Methods

  1. handle(Reader $reader, TokenStream $stream)

Code of CommentHandler{} WC 5.3.0

<?php
class CommentHandler implements HandlerInterface
{
    /**
     * {@inheritdoc}
     */
    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;
    }
}