You are here

class CssSelector in Zircon Profile 8

Same name in this branch
  1. 8 vendor/symfony/css-selector/CssSelector.php \Symfony\Component\CssSelector\CssSelector
  2. 8 vendor/behat/mink/src/Selector/CssSelector.php \Behat\Mink\Selector\CssSelector
Same name and namespace in other branches
  1. 8.0 vendor/behat/mink/src/Selector/CssSelector.php \Behat\Mink\Selector\CssSelector

CSS selector engine. Transforms CSS to XPath.

@author Konstantin Kudryashov <ever.zet@gmail.com>

Hierarchy

Expanded class hierarchy of CssSelector

1 file declares its use of CssSelector
CssSelectorTest.php in vendor/behat/mink/tests/Selector/CssSelectorTest.php

File

vendor/behat/mink/src/Selector/CssSelector.php, line 20

Namespace

Behat\Mink\Selector
View source
class CssSelector implements SelectorInterface {

  /**
   * Translates CSS into XPath.
   *
   * @param string|array $locator current selector locator
   *
   * @return string
   */
  public function translateToXPath($locator) {
    if (!is_string($locator)) {
      throw new \InvalidArgumentException('The CssSelector expects to get a string as locator');
    }
    return CSS::toXPath($locator);
  }

}

Members