class ObjectCollection implements Collection, ArrayRepresentation (View source)

Constants

NODE_OBJECT

NODE_CHILDREN

Methods

__construct(Collection|array|Traversable $collection, ClassMetadata $metadata)

No description

next()

No description

forAll(Closure $p)

No description

remove($key)

No description

current()

No description

partition(Closure $p)

No description

offsetExists($offset)

No description

slice($offset, $length = null)

No description

get($key)

No description

offsetUnset($offset)

No description

toArray()

No description

map(Closure $func)

No description

indexOf($element)

No description

key()

No description

add($element)

No description

offsetGet($offset)

No description

set($key, $value)

No description

getValues()

No description

last()

No description

containsKey($key)

No description

clear()

No description

isEmpty()

No description

count()

No description

getKeys()

No description

offsetSet($offset, $value)

No description

filter(Closure $p)

No description

contains($element)

No description

getIterator()

No description

exists(Closure $p)

No description

removeElement($element)

No description

first()

No description

unknown|Collection|NULL
findFirst(Closure $p)

doctrine/collections v2.0 API

reduce(Closure $func, mixed $initial = null)

No description

getArrayCopy()

No description

Collection
getIdentifiers()

Get list of object identifiers

array
getDictionary(callable|NULL $idStringifier = null)

No description

array
getHierarchyFromParentAssociation(string $parentAssociationName, ReflectionService $reflectionService = null)

Get the object collection reorganized as a tree.

Details

__construct(Collection|array|Traversable $collection, ClassMetadata $metadata)

Parameters

Collection|array|Traversable $collection Object collection
ClassMetadata $metadata Object class metadata

next()

forAll(Closure $p)

Parameters

Closure $p

remove($key)

Parameters

$key

current()

partition(Closure $p)

Parameters

Closure $p

offsetExists($offset)

Parameters

$offset

slice($offset, $length = null)

Parameters

$offset
$length

get($key)

Parameters

$key

offsetUnset($offset)

Parameters

$offset

toArray()

map(Closure $func)

Parameters

Closure $func

indexOf($element)

Parameters

$element

key()

add($element)

Parameters

$element

offsetGet($offset)

Parameters

$offset

set($key, $value)

Parameters

$key
$value

getValues()

last()

containsKey($key)

Parameters

$key

clear()

isEmpty()

count()

getKeys()

offsetSet($offset, $value)

Parameters

$offset
$value

filter(Closure $p)

Parameters

Closure $p

contains($element)

Parameters

$element

getIterator()

exists(Closure $p)

Parameters

Closure $p

removeElement($element)

Parameters

$element

first()

unknown|Collection|NULL findFirst(Closure $p)

doctrine/collections v2.0 API

Parameters

Closure $p

Return Value

unknown|Collection|NULL

reduce(Closure $func, mixed $initial = null)

Parameters

Closure $func
mixed $initial

getArrayCopy()

Collection getIdentifiers()

Get list of object identifiers

Return Value

Collection

array getDictionary(callable|NULL $idStringifier = null)

Parameters

callable|NULL $idStringifier ID stringifier for composite IDs

Return Value

array Dictionary of objects where keys are the object IDs

Exceptions

InvalidArgumentException

array getHierarchyFromParentAssociation(string $parentAssociationName, ReflectionService $reflectionService = null)

Get the object collection reorganized as a tree.

Parameters

string $parentAssociationName Parent association field name
ReflectionService $reflectionService Reflection service. If not set, the default reflection service is used.

Return Value

array

Exceptions

InvalidArgumentException