|
const | TYPE_FINAL = '!done' |
| The last response for a request.
|
|
const | TYPE_DATA = '!re' |
| A response with data.
|
|
const | TYPE_ERROR = '!trap' |
| A response signifying error.
|
|
const | TYPE_FATAL = '!fatal' |
| A response signifying a fatal error, due to which the connection would be terminated.
|
|
|
| $unrecognizedWords = array() |
|
| $attributes = array() |
|
Definition at line 43 of file Response.php.
◆ __construct()
__construct |
( |
Communicator |
$com, |
|
|
|
$asStream = false , |
|
|
|
$sTimeout = 0 , |
|
|
|
$usTimeout = null , |
|
|
Registry |
$reg = null |
|
) |
| |
Extracts a new response from a communicator.
- Parameters
-
Communicator | $com | The communicator from which to extract the new response. |
bool | $asStream | Whether to populate the argument values with streams instead of strings. |
int | $sTimeout | If a response is not immediately available, wait this many seconds. If NULL, wait indefinitely. |
int | null | $usTimeout | Microseconds to add to the waiting time. |
Registry | null | $reg | An optional registry to sync the response with. |
- See also
- getType()
-
getArgument()
Definition at line 97 of file Response.php.
◆ getArgument()
Gets the value of an argument.
- Parameters
-
string | $name | The name of the argument. |
- Returns
- string|resource|null The value of the specified argument. Returns NULL if such an argument is not set.
- Deprecated:
- 1.0.0b5 Use static::getProperty() instead. This method will be removed upon final release, and is currently left standing merely because it can't be easily search&replaced in existing code, due to the fact the name "getArgument()" is shared with Request::getArgument(), which is still valid.
Definition at line 291 of file Response.php.
◆ getProperty()
Gets the value of a property.
- Parameters
-
string | $name | The name of the property. |
- Returns
- string|resource|null The value of the specified property. Returns NULL if such a property is not set.
Definition at line 310 of file Response.php.
◆ getType()
Gets the response type.
- Returns
- string The response type.
- See also
- setType()
Definition at line 271 of file Response.php.
◆ getUnrecognizedWords()
Gets a list of unrecognized words.
- Returns
- string[] The list of unrecognized words.
Definition at line 320 of file Response.php.
◆ setType()
Sets the response type.
Sets the response type. Valid values are the TYPE_* constants.
- Parameters
-
string | $type | The new response type. |
- Returns
- $this The response object.
- See also
- getType()
Definition at line 245 of file Response.php.
The documentation for this class was generated from the following file: