W3cubDocs

/Symfony 4.1

EmptyStringParser

class EmptyStringParser implements ParserInterface

CSS selector class parser shortcut.

This shortcut ensure compatibility with previous version. - The parser fails to parse an empty string. - In the previous version, an empty string matches each tags.

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

Methods

array parse(string $source)

Parses given selector source into an array of tokens.

Details

array parse(string $source)

Parses given selector source into an array of tokens.

Parameters

string $source

Return Value

array

© 2004–2017 Fabien Potencier
Licensed under the MIT License.
https://api.symfony.com/4.1/Symfony/Component/CssSelector/Parser/Shortcut/EmptyStringParser.html