コード例 #1
0
ファイル: Block.php プロジェクト: qa-tools/qa-tools
 /**
  * Create instance of BEM block.
  *
  * @param string              $name         Block name.
  * @param array|NodeElement[] $nodes        Nodes associated with this block.
  * @param IPageFactory        $page_factory Page factory.
  * @param BEMElementLocator   $locator      Locator.
  */
 public final function __construct($name, array $nodes, IPageFactory $page_factory, BEMElementLocator $locator)
 {
     parent::__construct($name);
     $this->_nodes = $nodes;
     $this->_locator = $locator;
     $page_factory->initElements($this, $page_factory->createDecorator($this));
 }
コード例 #2
0
ファイル: Element.php プロジェクト: qa-tools/qa-tools
 /**
  * Specifies wrapped WebElement and element's name.
  *
  * @param string     $name            Element name.
  * @param WebElement $wrapped_element Wrapped element.
  */
 public function __construct($name, WebElement $wrapped_element)
 {
     parent::__construct($name);
     $this->_wrappedElement = $wrapped_element;
 }