\Message.php
RouterOS API client implementation.
This package allows you to read and write information from a RouterOS host using MikroTik's RouterOS API.
PHP version 5
- Author
- Vasil Rangelov
- Category
- Net
- Copyright
- 2011 Vasil Rangelov
- License
- LGPL License 2.1
- Link
- http://netrouteros.sourceforge.net/
- Package
- PEAR2_Net_RouterOS
- Version
- 1.0.0b1
\PEAR2\Net\RouterOS\Message
Represents a RouterOS message.
- Children
- \PEAR2\Net\RouterOS\Request
- \PEAR2\Net\RouterOS\Response
- Author
- Vasil Rangelov
- Category
- Net
- License
- LGPL License 2.1
- Link
- http://netrouteros.sourceforge.net/
Properties

string
$_tag= 'null'
nullDetails- Type
- string
Methods

getAllArguments(
)
:
arrayGets all arguments in an array.
| Type | Description |
|---|---|
| array | An array with the keys as argument names, and the array values as argument values. |
- See
- \PEAR2\Net\RouterOS\getArgument()
- See
- \PEAR2\Net\RouterOS\setArgument()

getArgument(
string $name
)
:
string|resourceGets the value of an argument.
| Name | Type | Description |
|---|---|---|
| $name | string | The name of the argument. |
| Type | Description |
|---|---|
| string|resource | The value of the specified argument. Returns NULL if such an argument is not set. |
- See
- \PEAR2\Net\RouterOS\setArgument()

getTag(
)
:
stringGets the tag that the message is associated with.
| Type | Description |
|---|---|
| string | The current tag or NULL if there isn't a tag. |
- See
- \PEAR2\Net\RouterOS\setTag()

removeAllArguments(
)
:
\PEAR2\Net\RouterOS\MessageRemoves all arguments from the message.
| Type | Description |
|---|---|
| \PEAR2\Net\RouterOS\Message | The message object. |

sanitizeArgumentName(
mixed $name
)
:
stringSanitizes a name of an argument (message or query one).
| Name | Type | Description |
|---|---|---|
| $name | mixed | The name to sanitize. |
| Type | Description |
|---|---|
| string | The sanitized name. |

sanitizeArgumentValue(
mixed $value
)
:
stringSanitizes a value of an argument (message or query one).
| Name | Type | Description |
|---|---|---|
| $value | mixed | The value to sanitize. |
| Type | Description |
|---|---|
| string | The sanitized value. |

setArgument(
string $name, string $value
=
null
)
:
\PEAR2\Net\RouterOS\MessageSets an argument for the message.
| Name | Type | Description |
|---|---|---|
| $name | string | Name of the argument. |
| $value | string | Value of the argument. Setting the value to NULL removes an argument of this name. |
| Type | Description |
|---|---|
| \PEAR2\Net\RouterOS\Message | The message object. |
- See
- \PEAR2\Net\RouterOS\getArgument()

setTag(
string $tag
)
:
\PEAR2\Net\RouterOS\MessageSets the tag to associate the request with.
Sets the tag to associate the message with. Setting NULL erases the currently set tag.
| Name | Type | Description |
|---|---|---|
| $tag | string | The tag to set. |
| Type | Description |
|---|---|
| \PEAR2\Net\RouterOS\Message | The message object. |
- See
- \PEAR2\Net\RouterOS\getTag()