Class Collection (namespace Nette\Collections)
SPL ArrayObject customization.
ArrayObject | --Collection
Implements interfaces:
Public Method Summary | |
---|---|
Collection |
|
void |
append
(mixed $item)
Appends the specified element to the end of this 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().
|
void |
freeze
()
Makes the object unmodifiable.
|
string |
getClass
()
Returns the name of the class of this object.
|
string |
getItemType
()
Returns the item type.
|
ArrayIterator |
getIterator
()
Returns the iterator.
|
void |
import
(array|\Traversable $arr)
Import from array or any traversable object.
|
bool |
isFrozen
()
Is the object unmodifiable?
|
void |
isReadOnly
()
|
bool |
remove
(mixed $item)
Removes the first occurrence of the specified element.
|
void |
setReadOnly
()
|
void |
__call
($name, $args)
Call to undefined method.
|
static void |
__callStatic
($name, $args)
Call to undefined static method.
|
void |
__clone
()
Creates a modifiable clone of the object.
|
& void |
__get
($name)
Returns property value. Do not call directly.
|
bool |
__isset
(string $name)
Is property defined?
|
void |
__set
($name, $value)
Sets value of a property. Do not call directly.
|
void |
__unset
($name)
Access to undeclared property.
|
Protected Method Summary | |
---|---|
protected void |
beforeAdd
(mixed $item)
Responds when the item is about to be added to the collection.
|
protected int|FALSE |
search
(mixed $item)
Returns the index of the first occurrence of the specified element,.
|
protected Collection |
setArray
(array $array)
Protected exchangeArray().
|
protected void |
updating
()
|
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 |
Method Details | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
line 53 __constructpublic Collection __construct ([array $arr = Overridden in child classes as:
|
|||||||||||||||||||||
line 75 appendpublic void append (mixed $item) Appends the specified element to the end of this collection. Overridden in child classes as: Implementation of:
|
|||||||||||||||||||||
line 202 beforeAddprotected void beforeAdd (mixed $item) Responds when the item is about to be added to the collection.
|
|||||||||||||||||||||
line 121 clearpublic void clear () Removes all of the elements from this collection. Implementation of:
|
|||||||||||||||||||||
line 134 containspublic bool contains (mixed $item) Returns true if this collection contains the specified item. Implementation of:
|
|||||||||||||||||||||
line 240 exchangeArraypublic void exchangeArray ($array) Not supported. Use import().
|
|||||||||||||||||||||
line 358 freezepublic void freeze () Makes the object unmodifiable. Overridden in child classes as:
|
|||||||||||||||||||||
line 269 getClasspublic string getClass () Returns the name of the class of this object.
|
|||||||||||||||||||||
line 165 getItemTypepublic string getItemType () Returns the item type.
|
|||||||||||||||||||||
line 230 getIteratorpublic ArrayIterator getIterator () Returns the iterator.
|
|||||||||||||||||||||
line 147 importpublic void import (array|\Traversable $arr) Import from array or any traversable object. Overridden in child classes as:
|
|||||||||||||||||||||
line 369 isFrozenpublic bool isFrozen () Is the object unmodifiable?
|
|||||||||||||||||||||
line 185 isReadOnlypublic void isReadOnly ()
|
|||||||||||||||||||||
line 89 removepublic bool remove (mixed $item) Removes the first occurrence of the specified element. Overridden in child classes as: Implementation of:
|
|||||||||||||||||||||
line 109 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 252 setArrayprotected Collection setArray (array $array) Protected exchangeArray().
|
|||||||||||||||||||||
line 175 setReadOnlypublic void setReadOnly ()
|
|||||||||||||||||||||
line 390 updatingprotected void updating ()
|
|||||||||||||||||||||
line 281 __callpublic void __call ($name, $args) Call to undefined method.
|
|||||||||||||||||||||
line 293 __callStaticpublic static void __callStatic ($name, $args) Call to undefined static method.
|
|||||||||||||||||||||
line 380 __clonepublic void __clone () Creates a modifiable clone of the object. Overridden in child classes as:
|
|||||||||||||||||||||
line 306 __getpublic void & __get ($name) Returns property value. Do not call directly. Overridden in child classes as:
|
|||||||||||||||||||||
line 331 __issetpublic bool __isset (string $name) Is property defined? Overridden in child classes as:
|
|||||||||||||||||||||
line 318 __setpublic void __set ($name, $value) Sets value of a property. Do not call directly. Overridden in child classes as:
|
|||||||||||||||||||||
line 343 __unsetpublic void __unset ($name) Access to undeclared property. Overridden in child classes as:
|