Skip to content

Commit

Permalink
Update ReponseInterface documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
pionl committed Sep 25, 2020
1 parent a2f17be commit 149ea6d
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions src/Response/ResponseInterface.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,33 @@
<?php

namespace ByJG\ApiTools\Response;

use Psr\Http\Message\StreamInterface;

/**
* Adds an ability to return response of any kind without PSR dependency.
*/
interface ResponseInterface
{
/**
* @return string[][] Returns an associative array of the message's headers. Each
* key MUST be a header name, and each value MUST be an array of strings
* for that header.
*/
public function getHeaders();

/**
* The status code is a 3-digit integer result code of the server's attempt
* to understand and satisfy the request.
*
* @return int Status code.
*/
public function getStatusCode();

/**
* Gets the body of the message.
*
* @return StreamInterface|string Returns the body as a stream.
*/
public function getBody();
}

0 comments on commit 149ea6d

Please sign in to comment.