Describes SimpleApi Response interface.
◆ addMessage()
Samy\SimpleApi\ResponseInterface::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
Implemented in Samy\SimpleApi\Response.
◆ cleanLinks()
Samy\SimpleApi\ResponseInterface::cleanLinks |
( |
| ) |
|
◆ cleanMessages()
Samy\SimpleApi\ResponseInterface::cleanMessages |
( |
| ) |
|
◆ getData()
Samy\SimpleApi\ResponseInterface::getData |
( |
| ) |
|
◆ getError()
Samy\SimpleApi\ResponseInterface::getError |
( |
| ) |
|
Retrieve provided error parameter
- Returns
- string
◆ getErrorDescription()
Samy\SimpleApi\ResponseInterface::getErrorDescription |
( |
| ) |
|
Retrieve provided error description.
- Returns
- string
◆ getErrorUri()
Samy\SimpleApi\ResponseInterface::getErrorUri |
( |
| ) |
|
Retrieve provided error uri.
- Returns
- string
◆ getLink()
Samy\SimpleApi\ResponseInterface::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
Implemented in Samy\SimpleApi\Response.
◆ getLinks()
Samy\SimpleApi\ResponseInterface::getLinks |
( |
| ) |
|
◆ getMessages()
Samy\SimpleApi\ResponseInterface::getMessages |
( |
| ) |
|
◆ hasLink()
Samy\SimpleApi\ResponseInterface::hasLink |
( |
string |
$Name | ) |
|
Checks if a link exists by the given case-insensitive name.
- Parameters
-
- Returns
- bool
Implemented in Samy\SimpleApi\Response.
◆ isSuccess()
Samy\SimpleApi\ResponseInterface::isSuccess |
( |
| ) |
|
◆ withData()
Samy\SimpleApi\ResponseInterface::withData |
( |
mixed |
$Data | ) |
|
◆ withError()
Samy\SimpleApi\ResponseInterface::withError |
( |
string |
$Error | ) |
|
Return an instance with error parameter.
- Parameters
-
[in] | string | $Error | Error parameter. |
- Returns
- static
◆ withErrorDescription()
Samy\SimpleApi\ResponseInterface::withErrorDescription |
( |
string |
$ErrorDescription | ) |
|
Return an instance with error description.
- Parameters
-
[in] | string | $ErrorDescription | Error description. |
- Returns
- static
◆ withErrorUri()
Samy\SimpleApi\ResponseInterface::withErrorUri |
( |
string |
$ErrorUri | ) |
|
Return an instance with error uri.
- Parameters
-
[in] | string | $ErrorUri | Error uri. |
- Returns
- static
◆ withLink()
Samy\SimpleApi\ResponseInterface::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
Implemented in Samy\SimpleApi\Response.
◆ withoutLink()
Samy\SimpleApi\ResponseInterface::withoutLink |
( |
string |
$Name | ) |
|
◆ withSuccess()
Samy\SimpleApi\ResponseInterface::withSuccess |
( |
bool |
$Success | ) |
|
Return an instance with provided success status.
- Parameters
-
[in] | bool | $Success | Success status |
- Returns
- static
Implemented in Samy\SimpleApi\Response.
The documentation for this interface was generated from the following file: