public function filter($node)
    {
        $ret = array();
        $items = $this->_combinator->filter($node, $this->_element->getTagName());

        // filters items by element
        foreach ($items as $item) {
            if ($this->_element->match($item)) {
                array_push($ret, $item);
            }
        }

        // filter items by element filters
        $filters = $this->_element->getFilters();
        foreach ($filters as $filter) {
            $items = array();
            foreach ($ret as $i => $item) {
                if ($filter->match($item, $i, $ret)) {
                    array_push($items, $item);
                }
            }
            $ret = $items;
        }

        return $ret;
    }
public function filter($node)
    {
        $ret = array();
        $items = $this->_combinator->filter($node, $this->_element->getTagName());

        // filters items by element
        foreach ($items as $item) {
            if ($this->_element->match($item)) {
                array_push($ret, $item);
            }
        }

        // filter items by element filters
        $filters = $this->_element->getFilters();
        foreach ($filters as $filter) {
            $items = array();
            foreach ($ret as $i => $item) {
                if ($filter->match($item, $i, $ret)) {
                    array_push($items, $item);
                }
            }
            $ret = $items;
        }

        return $ret;
    }
public function filter ( $ node ) { $ ret = array ( ) ; $ items = $ this -> _combinator -> filter ( $ node , $ this -> _element -> getTagName ( ) ) ; // filters items by element foreach ( $ items as $ item ) { if ( $ this -> _element -> match ( $ item ) ) { array_push ( $ ret , $ item ) ; } } // filter items by element filters $ filters = $ this -> _element -> getFilters ( ) ; foreach ( $ filters as $ filter ) { $ items = array ( ) ; foreach ( $ ret as $ i => $ item ) { if ( $ filter -> match ( $ item , $ i , $ ret ) ) { array_push ( $ items , $ item ) ; } } $ ret = $ items ; } return $ ret ; }
Gets the elements that matches the factor.

@param DOMElement $node DOMElement object

@return array of DOMElement
Gets the elements that matches the factor .