PHP Class Doctrine\Common\Collections\ArrayCollection

Since: 2.0
Author: Guilherme Blanco ([email protected])
Author: Jonathan Wage ([email protected])
Author: Roman Borschel ([email protected])
Inheritance: implements Doctrine\Common\Collections\Collection
Show file Open project: doctrine/collections Class Usage Examples

Public Methods

Method Description
__construct ( array $elements = [] ) Initializes a new ArrayCollection.
__toString ( ) : string Returns a string representation of this object.
add ( $element ) {@inheritDoc}
clear ( ) {@inheritDoc}
contains ( $element ) {@inheritDoc}
containsKey ( $key ) {@inheritDoc}
count ( ) {@inheritDoc}
current ( ) {@inheritDoc}
exists ( Closure $p ) {@inheritDoc}
filter ( Closure $p ) {@inheritDoc}
first ( ) {@inheritDoc}
forAll ( Closure $p ) {@inheritDoc}
get ( $key ) {@inheritDoc}
getIterator ( ) Required by interface IteratorAggregate.
getKeys ( ) {@inheritDoc}
getValues ( ) {@inheritDoc}
indexOf ( $element ) {@inheritDoc}
isEmpty ( ) {@inheritDoc}
key ( ) {@inheritDoc}
last ( ) {@inheritDoc}
map ( Closure $func ) {@inheritDoc}
matching ( Doctrine\Common\Collections\Criteria $criteria ) {@inheritDoc}
next ( ) {@inheritDoc}
offsetExists ( $offset ) Required by interface ArrayAccess.
offsetGet ( $offset ) Required by interface ArrayAccess.
offsetSet ( $offset, $value ) Required by interface ArrayAccess.
offsetUnset ( $offset ) Required by interface ArrayAccess.
partition ( Closure $p ) {@inheritDoc}
remove ( $key ) {@inheritDoc}
removeElement ( $element ) {@inheritDoc}
set ( $key, $value ) {@inheritDoc}
slice ( $offset, $length = null ) {@inheritDoc}
toArray ( ) {@inheritDoc}

Protected Methods

Method Description
createFrom ( array $elements ) : static Creates a new instance from the specified elements.

Method Details

__construct() public method

Initializes a new ArrayCollection.
public __construct ( array $elements = [] )
$elements array

__toString() public method

Returns a string representation of this object.
public __toString ( ) : string
return string

add() public method

{@inheritDoc}
public add ( $element )

clear() public method

{@inheritDoc}
public clear ( )

contains() public method

{@inheritDoc}
public contains ( $element )

containsKey() public method

{@inheritDoc}
public containsKey ( $key )

count() public method

{@inheritDoc}
public count ( )

createFrom() protected method

This method is provided for derived classes to specify how a new instance should be created when constructor semantics have changed.
protected createFrom ( array $elements ) : static
$elements array Elements.
return static

current() public method

{@inheritDoc}
public current ( )

exists() public method

{@inheritDoc}
public exists ( Closure $p )
$p Closure

filter() public method

{@inheritDoc}
public filter ( Closure $p )
$p Closure

first() public method

{@inheritDoc}
public first ( )

forAll() public method

{@inheritDoc}
public forAll ( Closure $p )
$p Closure

get() public method

{@inheritDoc}
public get ( $key )

getIterator() public method

{@inheritDoc}
public getIterator ( )

getKeys() public method

{@inheritDoc}
public getKeys ( )

getValues() public method

{@inheritDoc}
public getValues ( )

indexOf() public method

{@inheritDoc}
public indexOf ( $element )

isEmpty() public method

{@inheritDoc}
public isEmpty ( )

key() public method

{@inheritDoc}
public key ( )

last() public method

{@inheritDoc}
public last ( )

map() public method

{@inheritDoc}
public map ( Closure $func )
$func Closure

matching() public method

{@inheritDoc}
public matching ( Doctrine\Common\Collections\Criteria $criteria )
$criteria Doctrine\Common\Collections\Criteria

next() public method

{@inheritDoc}
public next ( )

offsetExists() public method

{@inheritDoc}
public offsetExists ( $offset )

offsetGet() public method

{@inheritDoc}
public offsetGet ( $offset )

offsetSet() public method

{@inheritDoc}
public offsetSet ( $offset, $value )

offsetUnset() public method

{@inheritDoc}
public offsetUnset ( $offset )

partition() public method

{@inheritDoc}
public partition ( Closure $p )
$p Closure

remove() public method

{@inheritDoc}
public remove ( $key )

removeElement() public method

{@inheritDoc}
public removeElement ( $element )

set() public method

{@inheritDoc}
public set ( $key, $value )

slice() public method

{@inheritDoc}
public slice ( $offset, $length = null )

toArray() public method

{@inheritDoc}
public toArray ( )