-
-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update ReponseInterface documentation
- Loading branch information
Showing
1 changed file
with
22 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); | ||
} |