private function fetch(array $matchLine)
    {
        $result = array();

        foreach ($this->getSelector()->getConfig() as $match) {
            // Get the match value, optionally apply a function to it
            if (isset($match['apply'])) {
                $result[$match['name']] = $match['apply']($matchLine[$match['name']], $this->getSelector()->getSourceKey());
            } else {
                $result[$match['name']] = $matchLine[$match['name']];
            }

            // Validate this match
            if (isset($match['validate'])) {
                if (!$match['validate']($result[$match['name']], $this->getSelector()->getSourceKey())) {
                    $this->addLog('Skipping match because validation failed for '.$match['name'].': '.$result[$match['name']]);

                    return false;
                }
            }
        }

        // Filter the data
        if ($this->filter && !call_user_func($this->filter, $result)) {
            $this->addLog('Filtering out match: '.var_export($result, true));

            return false;
        }

        return $result;
    }
private function fetch(array $matchLine)
    {
        $result = array();

        foreach ($this->getSelector()->getConfig() as $match) {
            // Get the match value, optionally apply a function to it
            if (isset($match['apply'])) {
                $result[$match['name']] = $match['apply']($matchLine[$match['name']], $this->getSelector()->getSourceKey());
            } else {
                $result[$match['name']] = $matchLine[$match['name']];
            }

            // Validate this match
            if (isset($match['validate'])) {
                if (!$match['validate']($result[$match['name']], $this->getSelector()->getSourceKey())) {
                    $this->addLog('Skipping match because validation failed for '.$match['name'].': '.$result[$match['name']]);

                    return false;
                }
            }
        }

        // Filter the data
        if ($this->filter && !call_user_func($this->filter, $result)) {
            $this->addLog('Filtering out match: '.var_export($result, true));

            return false;
        }

        return $result;
    }
private function fetch ( array $ matchLine ) { $ result = array ( ) ; foreach ( $ this -> getSelector ( ) -> getConfig ( ) as $ match ) { // Get the match value, optionally apply a function to it if ( isset ( $ match [ 'apply' ] ) ) { $ result [ $ match [ 'name' ] ] = $ match [ 'apply' ] ( $ matchLine [ $ match [ 'name' ] ] , $ this -> getSelector ( ) -> getSourceKey ( ) ) ; } else { $ result [ $ match [ 'name' ] ] = $ matchLine [ $ match [ 'name' ] ] ; } // Validate this match if ( isset ( $ match [ 'validate' ] ) ) { if ( ! $ match [ 'validate' ] ( $ result [ $ match [ 'name' ] ] , $ this -> getSelector ( ) -> getSourceKey ( ) ) ) { $ this -> addLog ( 'Skipping match because validation failed for ' . $ match [ 'name' ] . ': ' . $ result [ $ match [ 'name' ] ] ) ; return false ; } } } // Filter the data if ( $ this -> filter && ! call_user_func ( $ this -> filter , $ result ) ) { $ this -> addLog ( 'Filtering out match: ' . var_export ( $ result , true ) ) ; return false ; } return $ result ; }
Fetch the values from a match.

@param array $matchLine

@return array
Fetch the values from a match .