Adds item to container.
Adds item to container.
Parameters:
API Tags:
Information Tags:
| Version: | 0.0.3 |
| Since: | 0.0.3 |
Number of items inside container.
Number of items inside container.
OTS_Container implementation of Countable interface differs from OTS_Item implemention. OTS_Item::count() returns count of given item, OTS_Container::count() returns number of items inside container. If somehow it would be possible to make container items with more then 1 in one place, you can use OTS_Item::getCount() and OTS_Item::setCount() in code where you are not sure if working with regular item, or container.
API Tags:
| Return: | Number of items. |
| Access: | public |
Information Tags:
| Version: | 0.0.3 |
| Since: | 0.0.3 |
Redefinition of:
- OTS_Item::count()
- Count value for current item.
API Tags:
| Return: | Current item. |
| Deprecated: | 0.1.0 Use getIterator(). |
| Access: | public |
Information Tags:
| Version: | 0.0.3 |
| Since: | 0.0.3 |
ArrayIterator getIterator(
)
|
|
Returns iterator handle for loops.
Returns iterator handle for loops.
API Tags:
| Return: | Items iterator. |
| Access: | public |
Information Tags:
| Version: | 0.1.0 |
| Version: | 0.0.3 |
| Since: | 0.0.3 |
| Since: | 0.1.0 |
Implementation of:
- IteratorAggregate::getIterator
API Tags:
| Return: | Iterator position. |
| Deprecated: | 0.1.0 Use getIterator(). |
| Access: | public |
Information Tags:
| Version: | 0.0.3 |
| Since: | 0.0.3 |
API Tags:
| Deprecated: | 0.1.0 Use getIterator(). |
| Access: | public |
Information Tags:
| Version: | 0.0.3 |
| Since: | 0.0.3 |
Removes given item from current container.
Removes given item from current container.
Passed item must be exacly instance of item which is stored in container, not it's copy. This method bases on PHP references.
Parameters:
API Tags:
Information Tags:
| Tutorial: | Players |
| Version: | 0.0.3 |
| Since: | 0.0.3 |
API Tags:
| Deprecated: | 0.1.0 Use getIterator(). |
| Access: | public |
Information Tags:
| Version: | 0.0.3 |
| Since: | 0.0.3 |
API Tags:
| Return: | Does next item exist. |
| Deprecated: | 0.1.0 Use getIterator(). |
| Access: | public |
Information Tags:
| Version: | 0.0.3 |
| Since: | 0.0.3 |
Clones all contained items.
Clones all contained items.
API Tags:
Information Tags:
| Version: | 0.1.3 |
| Version: | 0.0.3 |
| Since: | 0.0.3 |
| Since: | 0.1.3 |