Class Collection (namespace Nette\Collections)
SPL ArrayObject customization.
ArrayObject | --Collection
Implements interfaces:
| Constructor Summary | |
|---|---|
| public |
|
| Method Summary | |
|---|---|
| void |
append
(mixed $item)
Appends the specified element to the end of this collection.
|
| protected void |
beforeAdd
(mixed $item)
Responds when the item is about to be added to the collection.
|
| protected void |
beforeRemove
()
Responds when an item is about to be removed from the collection.
|
| void |
clear
()
Removes all of the elements from this collection.
|
| bool |
contains
(mixed $item)
Returns true if this collection contains the specified item.
|
| void |
exchangeArray
($array)
Not supported. Use import().
|
| string |
getClass
()
Returns the name of the class of this object.
|
| ArrayIterator |
getIterator
()
Returns the iterator.
|
| void |
import
(array|\Traversable $arr)
Import from array or any traversable object.
|
| bool |
isReadOnly
()
Returns a value indicating whether collection is read-only.
|
| bool |
remove
(mixed $item)
Removes the first occurrence of the specified element.
|
| protected int|FALSE |
search
(mixed $item)
Returns the index of the first occurrence of the specified element,.
|
| protected void |
setArray
(array $array)
Protected exchangeArray().
|
| void |
setReadOnly
()
Prevent any more modifications.
|
| void |
__call
($name, $args)
Call to undefined method.
|
| static void |
__callStatic
($name, $args)
Call to undefined static method.
|
| & void |
__get
($name)
Returns property value. Do not call directly.
|
| void |
__set
($name, $value)
Sets value of a property. Do not call directly.
|
| void |
__unset
($name)
Access to undeclared property.
|
| Methods Inherited From ArrayObject (Internal Class) |
|---|
| constructor __construct ( $array ), append ( $value ), asort ( ), count ( ), exchangeArray ( $array ), getArrayCopy ( ), getFlags ( ), getIterator ( ), getIteratorClass ( ), ksort ( ), natcasesort ( ), natsort ( ), offsetExists ( $index ), offsetGet ( $index ), offsetSet ( $index, $newval ), offsetUnset ( $index ), setFlags ( $flags ), setIteratorClass ( $iteratorClass ), uasort ( $cmp_function ), uksort ( $cmp_function ) |
| Constant Summary |
|---|
| Constants Inherited From ArrayObject (Internal Class) |
|---|
| ARRAY_AS_PROPS = 2, STD_PROP_LIST = 1 |
| Variable Summary | ||||
|---|---|---|---|---|
| protected string | $checkFunc | |
line 42 function to verify type |
|
| protected string | $itemType | |
line 39 type (class, interface, PHP type) |
|
| protected bool | $readOnly | FALSE |
line 45 |
|
| Constructor Details | |||||||||
|---|---|---|---|---|---|---|---|---|---|
|
line 54 __constructpublic __construct ([array $arr =
|
|||||||||
| Method Details | |||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
line 87 appendpublic void append (mixed $item) Appends the specified element to the end of this collection. Overridden in child classes as: Implementation of:
|
|||||||||||||||||||||
|
line 194 beforeAddprotected void beforeAdd (mixed $item) Responds when the item is about to be added to the collection.
|
|||||||||||||||||||||
|
line 221 beforeRemoveprotected void beforeRemove () Responds when an item is about to be removed from the collection.
|
|||||||||||||||||||||
|
line 133 clearpublic void clear () Removes all of the elements from this collection. Implementation of:
|
|||||||||||||||||||||
|
line 146 containspublic bool contains (mixed $item) Returns true if this collection contains the specified item. Implementation of:
|
|||||||||||||||||||||
|
line 248 exchangeArraypublic void exchangeArray ($array) Not supported. Use import().
|
|||||||||||||||||||||
|
line 276 getClasspublic string getClass () Returns the name of the class of this object.
|
|||||||||||||||||||||
|
line 238 getIteratorpublic ArrayIterator getIterator () Returns the iterator.
|
|||||||||||||||||||||
|
line 159 importpublic void import (array|\Traversable $arr) Import from array or any traversable object. Overridden in child classes as:
|
|||||||||||||||||||||
|
line 177 isReadOnlypublic bool isReadOnly () Returns a value indicating whether collection is read-only. Implementation of:
|
|||||||||||||||||||||
|
line 101 removepublic bool remove (mixed $item) Removes the first occurrence of the specified element. Overridden in child classes as: Implementation of:
|
|||||||||||||||||||||
|
line 121 searchprotected int|FALSE search (mixed $item) Returns the index of the first occurrence of the specified element,. or FALSE if this collection does not contain this element. Overridden in child classes as:
|
|||||||||||||||||||||
|
line 260 setArrayprotected void setArray (array $array) Protected exchangeArray().
|
|||||||||||||||||||||
|
line 74 setReadOnlypublic void setReadOnly () Prevent any more modifications.
|
|||||||||||||||||||||
|
line 288 __callpublic void __call ($name, $args) Call to undefined method.
|
|||||||||||||||||||||
|
line 312 __callStaticpublic static void __callStatic ($name, $args) Call to undefined static method.
|
|||||||||||||||||||||
|
line 325 __getpublic void & __get ($name) Returns property value. Do not call directly. Overridden in child classes as:
|
|||||||||||||||||||||
|
line 338 __setpublic void __set ($name, $value) Sets value of a property. Do not call directly. Overridden in child classes as:
|
|||||||||||||||||||||
|
line 351 __unsetpublic void __unset ($name) Access to undeclared property. Overridden in child classes as:
|
|||||||||||||||||||||