Methods summary
public
|
#
__construct( array $arr = NULL, string $type = NULL )
Parameters
- $arr
array to wrap
- $type
string class/interface name or ':type'
Throws
|
public
|
#
append( mixed $item )
Appends the specified element to the end of this collection.
Appends the specified element to the end of this collection.
Parameters
Throws
|
public
boolean
|
#
remove( mixed $item )
Removes the first occurrence of the specified element.
Removes the first occurrence of the specified element.
Parameters
Returns
boolean true if this collection changed as a result of the call
Throws
Implementation of
|
protected
integer|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.
Returns the index of the first occurrence of the specified element,. or FALSE
if this collection does not contain this element.
Parameters
Returns
integer|false
|
public
|
#
clear( )
Removes all of the elements from this collection.
Removes all of the elements from this collection.
Throws
Implementation of
|
public
boolean
|
#
contains( mixed $item )
Returns true if this collection contains the specified item.
Returns true if this collection contains the specified item.
Parameters
Returns
boolean
Implementation of
|
public
|
#
import( array|Traversable $arr )
Import from array or any traversable object.
Import from array or any traversable object.
Parameters
Throws
|
public
string
|
|
protected
|
#
beforeAdd( mixed $item )
Responds when the item is about to be added to the collection.
Responds when the item is about to be added to the collection.
Parameters
Throws
InvalidArgumentException, NotSupportedException
|
public
NArrayIterator
|
#
getIterator( )
Returns the iterator.
Returns
NArrayIterator
Implementation of
|
public
|
#
exchangeArray( $array )
Not supported. Use import().
Not supported. Use import().
|
protected
NCollection
|
#
setArray( array $array )
Protected exchangeArray().
Protected exchangeArray().
Parameters
Returns
|
public
NClassReflection
|
|
public
|
#
__call( $name, $args )
Call to undefined method.
Call to undefined method.
Throws
|
public static
|
#
__callStatic( $name, $args )
Call to undefined static method.
Call to undefined static method.
Throws
|
public
&
|
#
__get( $name )
Returns property value. Do not call directly.
Returns property value. Do not call directly.
Throws
|
public
|
#
__set( $name, $value )
Sets value of a property. Do not call directly.
Sets value of a property. Do not call directly.
Throws
|
public
boolean
|
#
__isset( string $name )
Is property defined?
Parameters
- $name
string property name
Returns
boolean
|
public
|
#
__unset( $name )
Access to undeclared property.
Access to undeclared property.
Throws
|
public
|
#
freeze( )
Makes the object unmodifiable.
Makes the object unmodifiable.
|
final public
boolean
|
#
isFrozen( )
Is the object unmodifiable?
Is the object unmodifiable?
Returns
boolean
|
public
|
#
__clone( )
Creates a modifiable clone of the object.
Creates a modifiable clone of the object.
|
protected
|
|