public function parse($line)
    {
        if (!preg_match($this->pcreFormat, $line, $matches)) {
            throw new FormatException($line);
        }

        $entry = $this->createEntry();

        foreach (array_filter(array_keys($matches), 'is_string') as $key) {
            if ('time' === $key && true !== $stamp = strtotime($matches[$key])) {
                $entry->stamp = $stamp;
            }

            $entry->{$key} = $matches[$key];
        }

        return $entry;
    }
public function parse($line)
    {
        if (!preg_match($this->pcreFormat, $line, $matches)) {
            throw new FormatException($line);
        }

        $entry = $this->createEntry();

        foreach (array_filter(array_keys($matches), 'is_string') as $key) {
            if ('time' === $key && true !== $stamp = strtotime($matches[$key])) {
                $entry->stamp = $stamp;
            }

            $entry->{$key} = $matches[$key];
        }

        return $entry;
    }
public function parse ( $ line ) { if ( ! preg_match ( $ this -> pcreFormat , $ line , $ matches ) ) { throw new FormatException ( $ line ) ; } $ entry = $ this -> createEntry ( ) ; foreach ( array_filter ( array_keys ( $ matches ) , 'is_string' ) as $ key ) { if ( 'time' === $ key && true !== $ stamp = strtotime ( $ matches [ $ key ] ) ) { $ entry -> stamp = $ stamp ; } $ entry -> { $ key } = $ matches [ $ key ] ; } return $ entry ; }
Parses one single log line.

@param string $line

@return \stdClass

@throws FormatException
Parses one single log line .