public static function logEntry($entry)
    {
        $parts = explode("|", $entry, 5);
        $array = array();

        if (count($parts) != 5) {
            $array["timestamp"] = 0;
            $array["level"] = TeamSpeak3::LOGLEVEL_ERROR;
            $array["channel"] = "ParamParser";
            $array["server_id"] = "";
            $array["msg"] = StringHelper::factory("convert error (" . trim($entry) . ")");
            $array["msg_plain"] = $entry;
            $array["malformed"] = true;
        } else {
            $array["timestamp"] = strtotime(trim($parts[0]));
            $array["level"] = self::logLevel(trim($parts[1]));
            $array["channel"] = trim($parts[2]);
            $array["server_id"] = trim($parts[3]);
            $array["msg"] = StringHelper::factory(trim($parts[4]));
            $array["msg_plain"] = $entry;
            $array["malformed"] = false;
        }

        return $array;
    }
public static function logEntry($entry)
    {
        $parts = explode("|", $entry, 5);
        $array = array();

        if (count($parts) != 5) {
            $array["timestamp"] = 0;
            $array["level"] = TeamSpeak3::LOGLEVEL_ERROR;
            $array["channel"] = "ParamParser";
            $array["server_id"] = "";
            $array["msg"] = StringHelper::factory("convert error (" . trim($entry) . ")");
            $array["msg_plain"] = $entry;
            $array["malformed"] = true;
        } else {
            $array["timestamp"] = strtotime(trim($parts[0]));
            $array["level"] = self::logLevel(trim($parts[1]));
            $array["channel"] = trim($parts[2]);
            $array["server_id"] = trim($parts[3]);
            $array["msg"] = StringHelper::factory(trim($parts[4]));
            $array["msg_plain"] = $entry;
            $array["malformed"] = false;
        }

        return $array;
    }
public static function logEntry ( $ entry ) { $ parts = explode ( "|" , $ entry , 5 ) ; $ array = array ( ) ; if ( count ( $ parts ) != 5 ) { $ array [ "timestamp" ] = 0 ; $ array [ "level" ] = TeamSpeak3 :: LOGLEVEL_ERROR ; $ array [ "channel" ] = "ParamParser" ; $ array [ "server_id" ] = "" ; $ array [ "msg" ] = StringHelper :: factory ( "convert error (" . trim ( $ entry ) . ")" ) ; $ array [ "msg_plain" ] = $ entry ; $ array [ "malformed" ] = true ; } else { $ array [ "timestamp" ] = strtotime ( trim ( $ parts [ 0 ] ) ) ; $ array [ "level" ] = self :: logLevel ( trim ( $ parts [ 1 ] ) ) ; $ array [ "channel" ] = trim ( $ parts [ 2 ] ) ; $ array [ "server_id" ] = trim ( $ parts [ 3 ] ) ; $ array [ "msg" ] = StringHelper :: factory ( trim ( $ parts [ 4 ] ) ) ; $ array [ "msg_plain" ] = $ entry ; $ array [ "malformed" ] = false ; } return $ array ; }
Converts a specified log entry string into an array containing the data.

@param  string $entry
@return array
Converts a specified log entry string into an array containing the data .