|
Erebot
latest
A modular IRC bot for PHP 5.3+
|
A wrapper that correctly splits messages received from an IRC server (data part). More...
Inheritance diagram for Erebot\IrcTextWrapper:Public Member Functions | |
| __construct ($parts) | |
| __toString () | |
| count () | |
| current () | |
| key () | |
| next () | |
| offsetExists ($offset) | |
| offsetGet ($offset) | |
| offsetSet ($offset, $value) | |
| offsetUnset ($offset) | |
| rewind () | |
| valid () | |
Protected Attributes | |
| $parts | |
| The parts wrapped by this instance. | |
| $position | |
| Position in the text. | |
A wrapper that correctly splits messages received from an IRC server (data part).
Definition at line 32 of file IrcTextWrapper.php.
| Erebot\IrcTextWrapper::__construct | ( | $parts | ) |
Constructs a new instance of a text wrapper.
| string | array | $parts | The text to wrap. |
Definition at line 46 of file IrcTextWrapper.php.
| Erebot\IrcTextWrapper::__toString | ( | ) |
Returns the wrapped text.
| string | The text wrapped by this instance. |
Implements Erebot\Interfaces\IrcTextWrapper.
Definition at line 98 of file IrcTextWrapper.php.
| Erebot\IrcTextWrapper::count | ( | ) |
Count elements of an object.
This method is executed when using the count() function on an object implementing the Countable interface.
| int | The custom count as an integer. |
Implements Countable.
Definition at line 119 of file IrcTextWrapper.php.
| Erebot\IrcTextWrapper::current | ( | ) |
Returns the current element.
| mixed | Current element. |
Implements Iterator.
Definition at line 125 of file IrcTextWrapper.php.
| Erebot\IrcTextWrapper::key | ( | ) |
Returns the key of the current element.
| scalar | Returns scalar on success, or null on failure. |
E_NOTICE on failure.Implements Iterator.
Definition at line 131 of file IrcTextWrapper.php.
| Erebot\IrcTextWrapper::next | ( | ) |
Moves the current position to the next element.
Implements Iterator.
Definition at line 137 of file IrcTextWrapper.php.
| Erebot\IrcTextWrapper::offsetExists | ( | $offset | ) |
Whether or not an offset exists.
This method is executed when using isset() or empty() on objects implementing ArrayAccess.
| mixed | $offset | An offset to check for. |
| bool | true is returned when the offset exists, false when it doesn't. |
true. Implements ArrayAccess.
Definition at line 155 of file IrcTextWrapper.php.
| Erebot\IrcTextWrapper::offsetGet | ( | $offset | ) |
Returns the value at specified offset.
This method is executed when checking if offset is empty().
| mixed | $offset | The offset to retrieve. |
| mixed | Value at the specified offset. |
Implements ArrayAccess.
Definition at line 161 of file IrcTextWrapper.php.
| Erebot\IrcTextWrapper::offsetSet | ( | $offset, | |
| $value | |||
| ) |
Assigns a value to the specified offset.
| mixed | $offset | The offset to assign the value to. |
| mixed | $value | The value to set. |
Implements ArrayAccess.
Definition at line 173 of file IrcTextWrapper.php.
| Erebot\IrcTextWrapper::offsetUnset | ( | $offset | ) |
Unsets an offset.
| mixed | $offset | The offset to unset. |
(unset). Implements ArrayAccess.
Definition at line 179 of file IrcTextWrapper.php.
| Erebot\IrcTextWrapper::rewind | ( | ) |
Rewinds back to the first element of the Iterator.
Implements Iterator.
Definition at line 143 of file IrcTextWrapper.php.
| Erebot\IrcTextWrapper::valid | ( | ) |
Checks if current position is valid.
This method is called after Iterator::rewind() and Iterator::next() to check if the current position is valid.
| bool | true if the current position is valid, false otherwise. |
false, the foreach loop will be terminated.Implements Iterator.
Definition at line 149 of file IrcTextWrapper.php.