PHP Класс Doctrine\ODM\MongoDB\PersistentCollection

С версии: 1.0
Автор: Jonathan H. Wage ([email protected])
Автор: Roman Borschel ([email protected])
Наследование: implements Doctrine\Common\Collections\Collection
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
__construct ( Doctrine\Common\Collections\Collection $coll, DocumentManager $dm, Configuration $c )
__sleep ( ) Called by PHP when this collection is serialized. Ensures that only the elements are properly serialized.
add ( $value )
clear ( )
clearSnapshot ( ) INTERNAL: Clears the internal snapshot information and sets isDirty to true if the collection has elements.
contains ( $element )
containsKey ( $key )
count ( )
current ( ) Gets the element of the collection at the current iterator position.
exists ( Closure $p )
filter ( Closure $p )
first ( )
forAll ( Closure $p )
get ( $key )
getDeleteDiff ( ) : array INTERNAL: getDeleteDiff
getInsertDiff ( ) : array INTERNAL: getInsertDiff
getIterator ( )
getKeys ( )
getMapping ( )
getOwner ( ) : object INTERNAL: Gets the collection owner.
getReferences ( )
getSnapshot ( ) : array INTERNAL: Returns the last snapshot of the elements in the collection.
getTypeClass ( )
getValues ( )
indexOf ( $element )
initialize ( ) Initializes the collection by loading its contents from the database if the collection is not yet initialized.
isDirty ( ) : boolean Gets a boolean flag indicating whether this collection is dirty which means its state needs to be synchronized with the database.
isEmpty ( )
isInitialized ( ) : boolean Checks whether this collection has been initialized.
key ( )
last ( )
map ( Closure $func )
next ( ) Moves the internal iterator position to the next element.
offsetExists ( $offset )
offsetGet ( $offset )
offsetSet ( $offset, $value )
offsetUnset ( $offset )
partition ( Closure $p )
remove ( $key )
removeElement ( $element )
set ( $key, $value )
setDirty ( boolean $dirty ) Sets a boolean flag, indicating whether this collection is dirty.
setInitialized ( boolean $bool ) Sets the initialized flag of the collection, forcing it into that state.
setOwner ( object $document, array $mapping ) INTERNAL: Sets the collection's owning entity together with the AssociationMapping that describes the association between the owner and the elements of the collection.
setReferences ( array $references ) Set the array of mongo database references to be used to initialize this collection.
slice ( $offset, $length = null )
takeSnapshot ( ) INTERNAL: Tells this collection to take a snapshot of its current state.
toArray ( )
unwrap ( ) Retrieves the wrapped Collection instance.

Приватные методы

Метод Описание
changed ( ) Marks this collection as changed/dirty.

Описание методов

__construct() публичный Метод

public __construct ( Doctrine\Common\Collections\Collection $coll, DocumentManager $dm, Configuration $c )
$coll Doctrine\Common\Collections\Collection
$dm DocumentManager
$c Configuration

__sleep() публичный Метод

Called by PHP when this collection is serialized. Ensures that only the elements are properly serialized.
public __sleep ( )

add() публичный Метод

public add ( $value )

clear() публичный Метод

public clear ( )

clearSnapshot() публичный Метод

INTERNAL: Clears the internal snapshot information and sets isDirty to true if the collection has elements.
public clearSnapshot ( )

contains() публичный Метод

public contains ( $element )

containsKey() публичный Метод

public containsKey ( $key )

count() публичный Метод

public count ( )

current() публичный Метод

Gets the element of the collection at the current iterator position.
public current ( )

exists() публичный Метод

public exists ( Closure $p )
$p Closure

filter() публичный Метод

public filter ( Closure $p )
$p Closure

first() публичный Метод

public first ( )

forAll() публичный Метод

public forAll ( Closure $p )
$p Closure

get() публичный Метод

public get ( $key )

getDeleteDiff() публичный Метод

INTERNAL: getDeleteDiff
public getDeleteDiff ( ) : array
Результат array

getInsertDiff() публичный Метод

INTERNAL: getInsertDiff
public getInsertDiff ( ) : array
Результат array

getIterator() публичный Метод

public getIterator ( )

getKeys() публичный Метод

public getKeys ( )

getMapping() публичный Метод

public getMapping ( )

getOwner() публичный Метод

INTERNAL: Gets the collection owner.
public getOwner ( ) : object
Результат object

getReferences() публичный Метод

public getReferences ( )

getSnapshot() публичный Метод

INTERNAL: Returns the last snapshot of the elements in the collection.
public getSnapshot ( ) : array
Результат array The last snapshot of the elements.

getTypeClass() публичный Метод

public getTypeClass ( )

getValues() публичный Метод

public getValues ( )

indexOf() публичный Метод

public indexOf ( $element )

initialize() публичный Метод

Initializes the collection by loading its contents from the database if the collection is not yet initialized.
public initialize ( )

isDirty() публичный Метод

Gets a boolean flag indicating whether this collection is dirty which means its state needs to be synchronized with the database.
public isDirty ( ) : boolean
Результат boolean TRUE if the collection is dirty, FALSE otherwise.

isEmpty() публичный Метод

public isEmpty ( )

isInitialized() публичный Метод

Checks whether this collection has been initialized.
public isInitialized ( ) : boolean
Результат boolean

key() публичный Метод

public key ( )

last() публичный Метод

public last ( )

map() публичный Метод

public map ( Closure $func )
$func Closure

next() публичный Метод

Moves the internal iterator position to the next element.
public next ( )

offsetExists() публичный Метод

См. также: containsKey()
public offsetExists ( $offset )

offsetGet() публичный Метод

См. также: get()
public offsetGet ( $offset )

offsetSet() публичный Метод

См. также: add()
См. также: set()
public offsetSet ( $offset, $value )

offsetUnset() публичный Метод

См. также: remove()
public offsetUnset ( $offset )

partition() публичный Метод

public partition ( Closure $p )
$p Closure

remove() публичный Метод

public remove ( $key )

removeElement() публичный Метод

public removeElement ( $element )

set() публичный Метод

public set ( $key, $value )

setDirty() публичный Метод

Sets a boolean flag, indicating whether this collection is dirty.
public setDirty ( boolean $dirty )
$dirty boolean Whether the collection should be marked dirty or not.

setInitialized() публичный Метод

Sets the initialized flag of the collection, forcing it into that state.
public setInitialized ( boolean $bool )
$bool boolean

setOwner() публичный Метод

INTERNAL: Sets the collection's owning entity together with the AssociationMapping that describes the association between the owner and the elements of the collection.
public setOwner ( object $document, array $mapping )
$document object
$mapping array

setReferences() публичный Метод

Set the array of mongo database references to be used to initialize this collection.
public setReferences ( array $references )
$references array

slice() публичный Метод

public slice ( $offset, $length = null )

takeSnapshot() публичный Метод

INTERNAL: Tells this collection to take a snapshot of its current state.
public takeSnapshot ( )

toArray() публичный Метод

public toArray ( )

unwrap() публичный Метод

Retrieves the wrapped Collection instance.
public unwrap ( )