Simple SimpleApi Response implementation.
◆ addMessage()
Samy\SimpleApi\Response::addMessage |
( |
string |
$Type, |
|
|
string |
$Text, |
|
|
mixed |
$Data = null |
|
) |
| |
Return an instance with added message.
- Parameters
-
[in] | string | $Type | Message type |
[in] | string | $Text | Message text |
[in] | mixed | $Data | Message data |
- Returns
- static
Implements Samy\SimpleApi\ResponseInterface.
◆ cleanLinks()
Samy\SimpleApi\Response::cleanLinks |
( |
| ) |
|
◆ cleanMessages()
Samy\SimpleApi\Response::cleanMessages |
( |
| ) |
|
◆ getBody()
Samy\SimpleApi\Response::getBody |
( |
| ) |
|
Overwrite Message body.
- Returns
- StreamInterface Returns the body as a stream.
◆ getData()
Samy\SimpleApi\Response::getData |
( |
| ) |
|
◆ getLink()
Samy\SimpleApi\Response::getLink |
( |
string |
$Name, |
|
|
string |
$Default = "" |
|
) |
| |
Retrieve a link url by the given case-insensitive name.
- Parameters
-
[in] | string | $Name | Link name |
[in] | string | $Default | Link default if not exists |
- Returns
- string
Implements Samy\SimpleApi\ResponseInterface.
◆ getLinks()
Samy\SimpleApi\Response::getLinks |
( |
| ) |
|
◆ getMessages()
Samy\SimpleApi\Response::getMessages |
( |
| ) |
|
◆ hasLink()
Samy\SimpleApi\Response::hasLink |
( |
string |
$Name | ) |
|
◆ isSuccess()
Samy\SimpleApi\Response::isSuccess |
( |
| ) |
|
◆ withBody()
Samy\SimpleApi\Response::withBody |
( |
|
$StreamInterface | ) |
|
Overwrite Psr7 withBody.
- Parameters
-
[in] | mixed | $StreamInterface | Body. |
- Returns
- static
◆ withData()
Samy\SimpleApi\Response::withData |
( |
mixed |
$Data | ) |
|
◆ withLink()
Samy\SimpleApi\Response::withLink |
( |
string |
$Name, |
|
|
string |
$Url |
|
) |
| |
Return an instance with the specified link.
- Parameters
-
[in] | string | $Name | Link name |
[in] | string | $Url | Link valid url |
- Returns
- static
Implements Samy\SimpleApi\ResponseInterface.
◆ withoutLink()
Samy\SimpleApi\Response::withoutLink |
( |
string |
$Name | ) |
|
◆ withSuccess()
Samy\SimpleApi\Response::withSuccess |
( |
bool |
$Success | ) |
|
◆ $data
Samy\SimpleApi\Response::$data = null |
|
protected |
◆ $link
Samy\SimpleApi\Response::$link = array() |
|
protected |
◆ $message
Samy\SimpleApi\Response::$message = array() |
|
protected |
◆ $success
Samy\SimpleApi\Response::$success = false |
|
protected |
The documentation for this class was generated from the following file: