PEAR2_Net_RouterOS
1.0.0b5
A MikroTik RouterOS client
|
Public Member Functions | |
__construct (Communicator $com, $asStream=false, $sTimeout=0, $usTimeout=null, Registry $reg=null) | |
Extracts a new response from a communicator. More... | |
getType () | |
Gets the response type. More... | |
getArgument ($name) | |
Gets the value of an argument. More... | |
getProperty ($name) | |
Gets the value of a property. More... | |
getUnrecognizedWords () | |
Gets a list of unrecognized words. More... | |
count ($mode=COUNT_NORMAL) | |
Counts the number of arguments or words. More... | |
Data Fields | |
const | TYPE_FINAL = '!done' |
The last response for a request. More... | |
const | TYPE_DATA = '!re' |
A response with data. More... | |
const | TYPE_ERROR = '!trap' |
A response signifying error. More... | |
const | TYPE_FATAL = '!fatal' |
A response signifying a fatal error, due to which the connection would be terminated. More... | |
Protected Member Functions | |
setType ($type) | |
Sets the response type. More... | |
Protected Attributes | |
$unrecognizedWords = array() | |
Additional Inherited Members |
Definition at line 42 of file Response.php.
__construct | ( | Communicator | $com, |
$asStream = false , |
|||
$sTimeout = 0 , |
|||
$usTimeout = null , |
|||
Registry | $reg = null |
||
) |
Extracts a new response from a communicator.
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 immediatly available, wait this many seconds. If NULL, wait indefinetly. |
int | $usTimeout | Microseconds to add to the waiting time. |
Registry | $reg | An optional registry to sync the response with. |
Definition at line 92 of file Response.php.
count | ( | $mode = COUNT_NORMAL | ) |
Counts the number of arguments or words.
int | $mode | The counter mode. Either COUNT_NORMAL or COUNT_RECURSIVE. When in normal mode, counts the number of arguments. When in recursive mode, counts the number of API words. |
Definition at line 327 of file Response.php.
getArgument | ( | $name | ) |
Gets the value of an argument.
string | $name | The name of the argument. |
Definition at line 283 of file Response.php.
getProperty | ( | $name | ) |
Gets the value of a property.
string | $name | The name of the property. |
Definition at line 302 of file Response.php.
getType | ( | ) |
Gets the response type.
Definition at line 264 of file Response.php.
getUnrecognizedWords | ( | ) |
Gets a list of unrecognized words.
Definition at line 312 of file Response.php.
|
protected |
Sets the response type.
Sets the response type. Valid values are the TYPE_* constants.
string | $type | The new response type. |
Definition at line 239 of file Response.php.
|
protected |
Definition at line 69 of file Response.php.
const TYPE_DATA = '!re' |
A response with data.
Definition at line 53 of file Response.php.
const TYPE_ERROR = '!trap' |
A response signifying error.
Definition at line 58 of file Response.php.
const TYPE_FATAL = '!fatal' |
A response signifying a fatal error, due to which the connection would be terminated.
Definition at line 64 of file Response.php.
const TYPE_FINAL = '!done' |
The last response for a request.
Definition at line 48 of file Response.php.