Skip to content

Instantly share code, notes, and snippets.

@viniciusss
Created June 2, 2014 14:08
Show Gist options
  • Save viniciusss/7103841b033ecf79fc11 to your computer and use it in GitHub Desktop.
Save viniciusss/7103841b033ecf79fc11 to your computer and use it in GitHub Desktop.
<?php
namespace Simonetti\MsMobile\SDK\Client;
use GuzzleHttp\Message\Response;
/**
* Resposta do client
* Interface ResponseInterface
* @package Simonetti\MsMobile\SDK\Client
*/
interface ResponseInterface
{
/**
* Reposta original retornada pelo Guzzle
* @param Response $response
*/
public function __construct(Response $response);
/**
* Retorna se a requisição foi executada com sucesso.
* @return bool
*/
public function isSuccessful();
/**
* Retorna a mensagem retornada pela requisição.
* @return string
*/
public function getMessage();
/**
* Retorna os dados retornados.
* @return array|null
*/
public function getData();
/**
* Retorna o código da requisição HTTP.
* @link http://pt.wikipedia.org/wiki/Anexo:Lista_de_c%C3%B3digos_de_status_HTTP
* @return int
*/
public function getHttpCode();
/**
* Transforma a resposta em string.
* @return string
*/
public function __toString();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment