Parser/Client/ClientParserAbstract.php
public function parse()
    {
        $result = null;

        if ($this->preMatchOverall()) {
            foreach ($this->getRegexes() as $regex) {
                $matches = $this->matchUserAgent($regex['regex']);

                if ($matches) {
                    $result = array(
                        'type'       => $this->parserName,
                        'name'       => $this->buildByMatch($regex['name'], $matches),
                        'version'    => $this->buildVersion($regex['version'], $matches)
                    );
                    break;
                }
            }
        }

        return $result;
    }
public function parse()
    {
        $result = null;

        if ($this->preMatchOverall()) {
            foreach ($this->getRegexes() as $regex) {
                $matches = $this->matchUserAgent($regex['regex']);

                if ($matches) {
                    $result = array(
                        'type'       => $this->parserName,
                        'name'       => $this->buildByMatch($regex['name'], $matches),
                        'version'    => $this->buildVersion($regex['version'], $matches)
                    );
                    break;
                }
            }
        }

        return $result;
    }
public function parse ( ) { $ result = null ; if ( $ this -> preMatchOverall ( ) ) { foreach ( $ this -> getRegexes ( ) as $ regex ) { $ matches = $ this -> matchUserAgent ( $ regex [ 'regex' ] ) ; if ( $ matches ) { $ result = array ( 'type' => $ this -> parserName , 'name' => $ this -> buildByMatch ( $ regex [ 'name' ] , $ matches ) , 'version' => $ this -> buildVersion ( $ regex [ 'version' ] , $ matches ) ) ; break ; } } } return $ result ; }
Parses the current UA and checks whether it contains any client information

@see $fixtureFile for file with list of detected clients

Step 1: Build a big regex containing all regexes and match UA against it
-> If no matches found: return
-> Otherwise:
Step 2: Walk through the list of regexes in feed_readers.yml and try to match every one
-> Return the matched feed reader

NOTE: Doing the big match before matching every single regex speeds up the detection
Parses the current UA and checks whether it contains any client information