public function read($line) { $matches = $this->match($line); if (!isset($matches['userAgentString'])) { throw ReaderException::userAgentParserError($line); } return $matches['userAgentString']; }