You are here

public function SelectorsHandler::__construct in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/behat/mink/src/Selector/SelectorsHandler.php \Behat\Mink\Selector\SelectorsHandler::__construct()

Initializes selectors handler.

Parameters

SelectorInterface[] $selectors default selectors to register:

File

vendor/behat/mink/src/Selector/SelectorsHandler.php, line 30

Class

SelectorsHandler
Selectors handler.

Namespace

Behat\Mink\Selector

Code

public function __construct(array $selectors = array()) {
  $this->escaper = new Escaper();
  $this
    ->registerSelector('named_partial', new PartialNamedSelector());
  $this
    ->registerSelector('named_exact', new ExactNamedSelector());
  $this
    ->registerSelector('css', new CssSelector());
  foreach ($selectors as $name => $selector) {
    $this
      ->registerSelector($name, $selector);
  }
}