|
Plop
A simple logging library for PHP
|
A class that can be used to handle collections of objects. More...
Inheritance diagram for Plop\Collection:Public Member Functions | |
| count () | |
| getIterator () | |
| offsetExists ($offset) | |
| offsetGet ($offset) | |
| offsetSet ($offset, $value) | |
| offsetUnset ($offset) | |
Public Attributes | |
| const | TYPE_HINT = null |
Protected Attributes | |
| $items = array() | |
| List of items in the collection. | |
A class that can be used to handle collections of objects.
Definition at line 27 of file Collection.php.
| Plop\Collection::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 35 of file Collection.php.
| Plop\Collection::getIterator | ( | ) |
Retrieve an external iterator.
| Traversable | An instance of an object implementing Iterator or Traversable |
Implements IteratorAggregate.
Definition at line 41 of file Collection.php.
| Plop\Collection::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. |
Implements ArrayAccess.
Definition at line 68 of file Collection.php.
| Plop\Collection::offsetGet | ( | $offset | ) |
Returns the value at the 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 47 of file Collection.php.
| Plop\Collection::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 53 of file Collection.php.
| Plop\Collection::offsetUnset | ( | $offset | ) |
Unsets an offset.
| mixed | $offset | The offset to unset. |
Implements ArrayAccess.
Definition at line 76 of file Collection.php.