lib/Webforge/DOM/Query.php
protected function constructQuery(Query $query, $selector = NULL) {
    if ($selector !== NULL) {
      throw new InvalidArgumentException('You must not provide a selector if query is first argument. Use find for that(!)');
    }
    $this->setSelector($query->getSelector());
    $this->document = $query->getDocument();
    
    parent::__construct($query->toArray());
    $this->length = count($this);
  }
protected function constructQuery(Query $query, $selector = NULL) {
    if ($selector !== NULL) {
      throw new InvalidArgumentException('You must not provide a selector if query is first argument. Use find for that(!)');
    }
    $this->setSelector($query->getSelector());
    $this->document = $query->getDocument();
    
    parent::__construct($query->toArray());
    $this->length = count($this);
  }
protected function constructQuery ( Query $ query , $ selector = NULL ) { if ( $ selector !== NULL ) { throw new InvalidArgumentException ( 'You must not provide a selector if query is first argument. Use find for that(!)' ) ; } $ this -> setSelector ( $ query -> getSelector ( ) ) ; $ this -> document = $ query -> getDocument ( ) ; parent :: __construct ( $ query -> toArray ( ) ) ; $ this -> length = count ( $ this ) ; }
Clones a Query Object
Clones a Query Object