Interface for collections
Located in /Collection/Interface.php (line 23)
Countable | --Xyster_Collection_Interface
Class | Description |
---|---|
Xyster_Collection_Set_Interface | A tag interface for no-duplicate collections |
Xyster_Collection_List_Interface | Index-based collection |
Adds an item to the collection
Some collections don't accept duplicate values, and should return false if the provided value is already in the collection. If the collection is not allowed to contain the supplied value, an InvalidArgumentException should be thrown.
Removes all items from the collection
Tests to see whether the collection contains the value supplied
If the supplied value is an object, the comparison will be done for identity (===) and not for value (==).
Tests to see whether the collection contains all of the supplied values
Tests to see whether the collection contains any of the supplied values
Basically, implementations can safely return true on the first item that is found.
Tests to see if the collection contains no elements
The return value from this method should be equivalent to
Merges the values from the supplied collection into this one
If the implementing collection is not allowed to contain the same value twice, it should only add ones in $values not present in $this. If the implementing collection can contain duplicates, then the values can just be appended.
If the collection is not allowed to contain the supplied value, an InvalidArgumentException should be thrown.
Removes the specified value from the collection
Removes all of the specified values from the collection
Removes all values from the collection except for the ones specified
If the collection doesn't contain any of the values supplied, it should simply be emptied.
Puts the items in this collection into an array
Documentation generated on Mon, 19 May 2008 17:07:23 -0400 by phpDocumentor 1.4.2