CssSelector::getTexts PHP Method

getTexts() public method

public getTexts ( $selector )
    public function getTexts($selector)
    {
        $texts = array();
        foreach ($this->getElements($selector) as $element) {
            $texts[] = $element->nodeValue;
        }
        return $texts;
    }

Usage Example

Exemplo n.º 1
0
 /**
  *    Sets the dom tree and the css selector to compare against
  *    @param mixed $dom          Dom tree to search into.
  *    @param mixed $selector     Css selector to match element.
  *    @param string $message     Customised message on failure.
  *    @access public
  */
 function CssSelectorExpectation($dom, $selector, $message = '%s')
 {
     $this->SimpleExpectation($message);
     $this->_dom = $dom;
     $this->_selector = $selector;
     $css_selector = new CssSelector($this->_dom);
     $this->_value = $css_selector->getTexts($this->_selector);
 }
All Usage Examples Of CssSelector::getTexts