public static function fromRaw(array $raw)
    {
        $last = $raw[count($raw) - 2];
        if (strncmp($last, 'ACK', 3) === 0) {
            return self::produceFailResponse($last);
        }
        array_pop($raw);
        array_pop($raw);
        return new self($raw);
    }
public static function fromRaw(array $raw)
    {
        $last = $raw[count($raw) - 2];
        if (strncmp($last, 'ACK', 3) === 0) {
            return self::produceFailResponse($last);
        }
        array_pop($raw);
        array_pop($raw);
        return new self($raw);
    }
public static function fromRaw ( array $ raw ) { $ last = $ raw [ count ( $ raw ) - 2 ] ; if ( strncmp ( $ last , 'ACK' , 3 ) === 0 ) { return self :: produceFailResponse ( $ last ) ; } array_pop ( $ raw ) ; array_pop ( $ raw ) ; return new self ( $ raw ) ; }
Create response from raw one
@param array $raw Raw data (lines)
@return FailSocketResponse|SocketResponse
Create response from raw one