Definition at line 48 of file Message.php.
◆ __invoke()
A shorthand gateway.
This is a magic PHP method that allows you to call the object as a function. Depending on the argument given, one of the other functions in the class is invoked and its returned value is returned by this function.
- Parameters
-
string | null | $name | The name of an attribute to get the value of, or NULL to get the tag. |
- Returns
- string|resource The value of the specified attribute, or the tag if NULL is provided.
Definition at line 81 of file Message.php.
◆ count()
Counts the number of attributes.
- Returns
- int The number of attributes.
Definition at line 194 of file Message.php.
◆ getAttribute()
Gets the value of an attribute.
- Parameters
-
string | $name | The name of the attribute. |
- Returns
- string|resource|null The value of the specified attribute. Returns NULL if such an attribute is not set.
- See also
- setAttribute()
Definition at line 166 of file Message.php.
◆ getIterator()
Gets all arguments in an array.
- Returns
- ArrayObject An ArrayObject with the keys being argument names, and the array values being argument values.
- See also
- getArgument()
-
setArgument()
Definition at line 184 of file Message.php.
◆ getTag()
Gets the tag that the message is associated with.
- Returns
- string The current tag or NULL if there isn't a tag.
- See also
- setTag()
Definition at line 133 of file Message.php.
◆ removeAllAttributes()
Removes all attributes from the message.
- Returns
- $this The message object.
Definition at line 232 of file Message.php.
◆ sanitizeAttributeName()
static sanitizeAttributeName |
( |
|
$name | ) |
|
|
static |
Sanitizes a name of an attribute (message or query one).
- Parameters
-
mixed | $name | The name to sanitize. |
- Returns
- string The sanitized name.
Definition at line 96 of file Message.php.
◆ sanitizeAttributeValue()
static sanitizeAttributeValue |
( |
|
$value | ) |
|
|
static |
Sanitizes a value of an attribute (message or query one).
- Parameters
-
mixed | $value | The value to sanitize. |
- Returns
- string|resource The sanitized value.
Definition at line 117 of file Message.php.
◆ setAttribute()
setAttribute |
( |
|
$name, |
|
|
|
$value = '' |
|
) |
| |
|
protected |
Sets an attribute for the message.
- Parameters
-
string | $name | Name of the attribute. |
string | resource | null | $value | Value of the attribute as a string or seekable stream. Setting the value to NULL removes an argument of this name. If a seekable stream is provided, it is sent from its current position to its end, and the pointer is seeked back to its current position after sending. Non seekable streams, as well as all other types, are casted to a string. |
- Returns
- $this The message object.
- See also
- getArgument()
Definition at line 216 of file Message.php.
◆ setTag()
Sets the tag to associate the request with.
Sets the tag to associate the message with. Setting NULL erases the currently set tag.
- Parameters
-
string | $tag | The tag to set. |
- Returns
- $this The message object.
- See also
- getTag()
Definition at line 150 of file Message.php.
The documentation for this class was generated from the following file: