public static function fromCommand(OperationCommand $command) { $response = $command->getResponse(); return new self(['status' => $response->getStatusCode(), 'reason' => $response->getReasonPhrase(), 'text' => $response->getBody(true)]); }