You are here

public function EmptyStringParser::parse in Zircon Profile 8.0

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

Parses given selector source into an array of tokens.

Parameters

string $source:

Return value

SelectorNode[]

Overrides ParserInterface::parse

File

vendor/symfony/css-selector/Parser/Shortcut/EmptyStringParser.php, line 35

Class

EmptyStringParser
CSS selector class parser shortcut.

Namespace

Symfony\Component\CssSelector\Parser\Shortcut

Code

public function parse($source) {

  // Matches an empty string
  if ($source == '') {
    return array(
      new SelectorNode(new ElementNode(null, '*')),
    );
  }
  return array();
}