QueryPath\DOMQuery::find PHP Method

find() public method

Given a CSS Selector, find matching items.
See also: filter()
See also: is()
public find ( string $selector )
$selector string CSS 3 Selector
    public function find($selector)
    {
        //$query = new QueryPathEventHandler($this->matches);
        $query = new \QueryPath\CSS\DOMTraverser($this->matches);
        $query->find($selector);
        //$this->setMatches($query->matches());
        //return $this;
        return $this->inst($query->matches(), null, $this->options);
    }

Usage Example

 /**
  * Write the title in the title tag of the page.
  */
 protected function renderTitle()
 {
     // Render page title
     if ($this->pageTitle != null) {
         $title = mb_convert_encoding($this->pageTitle, $this->getCharset(), 'auto');
         $this->qp->find("title")->append($title);
     }
 }
All Usage Examples Of QueryPath\DOMQuery::find