classes/xml/XmlParser.php
public function parseKeys($data, $offset)
    {
        $element   = \preg_quote($this->getIndex()->getElement());
        $attribute = \preg_quote($this->getIndex()->getAttribute());
        $pregExp = '/<' . $element . '\s([^>]*\s)?'
            . $attribute . '\s*=\s*([\'"])(.+?)\2[^>]*>/si';

        \preg_match_all(
            $pregExp,
            $data,
            $matches,
            PREG_OFFSET_CAPTURE | PREG_SET_ORDER
        );

        $keys = array();

        foreach ($matches as $match) {
            $keys[] = new FoundKey($match[0][1], $match[3][0]);

        }

        return $keys;
    }
public function parseKeys($data, $offset)
    {
        $element   = \preg_quote($this->getIndex()->getElement());
        $attribute = \preg_quote($this->getIndex()->getAttribute());
        $pregExp = '/<' . $element . '\s([^>]*\s)?'
            . $attribute . '\s*=\s*([\'"])(.+?)\2[^>]*>/si';

        \preg_match_all(
            $pregExp,
            $data,
            $matches,
            PREG_OFFSET_CAPTURE | PREG_SET_ORDER
        );

        $keys = array();

        foreach ($matches as $match) {
            $keys[] = new FoundKey($match[0][1], $match[3][0]);

        }

        return $keys;
    }
public function parseKeys ( $ data , $ offset ) { $ element = \ preg_quote ( $ this -> getIndex ( ) -> getElement ( ) ) ; $ attribute = \ preg_quote ( $ this -> getIndex ( ) -> getAttribute ( ) ) ; $ pregExp = '/<' . $ element . '\s([^>]*\s)?' . $ attribute . '\s*=\s*([\'"])(.+?)\2[^>]*>/si' ; \ preg_match_all ( $ pregExp , $ data , $ matches , PREG_OFFSET_CAPTURE | PREG_SET_ORDER ) ; $ keys = array ( ) ; foreach ( $ matches as $ match ) { $ keys [ ] = new FoundKey ( $ match [ 0 ] [ 1 ] , $ match [ 3 ] [ 0 ] ) ; } return $ keys ; }
Returns an array with FoundKey objects

$data is parsed for keys. The found keys are returned.

@param string $data   Parseable data
@param int    $offset The position where the date came from

@return array
@see FoundKey
Returns an array with FoundKey objects