PHP Interface Nextras\Orm\Relationships\IRelationshipCollection

Inheritance: extends Nextras\Orm\Entity\IProperty, extends IteratorAggregat\IteratorAggregate, extends Countabl\Countable
Exibir arquivo Open project: nextras/orm Interface Usage Examples

Public Methods

Method Description
add ( Nextras\Orm\Entity\IEntity | scalar $entity ) : Nextras\Orm\Entity\IEntity Adds entity.
countStored ( ) : integer Counts collection entities without fetching them from storage.
doPersist ( ) DO NOT CALL THIS METHOD DIRECTLY.
get ( ) : Nextras\Orm\Collection\ICollection Returns collection of all entity.
getEntitiesForPersistence ( ) : mixed[] Returns IEntity or IRelationshipContainer for persistence.
has ( Nextras\Orm\Entity\IEntity | scalar $entity ) : boolean
isLoaded ( ) : boolean Returns true if colletion was loaded.
isModified ( ) : boolean Returns true if relationship is modified.
remove ( Nextras\Orm\Entity\IEntity | scalar $entity ) : Nextras\Orm\Entity\IEntity Removes entity.
set ( array $data ) : Nextras\Orm\Relationships\IRelationshipCollection Replaces all entities with given ones.
setParent ( Nextras\Orm\Entity\IEntity $parent )

Method Details

add() public method

Adds entity.
public add ( Nextras\Orm\Entity\IEntity | scalar $entity ) : Nextras\Orm\Entity\IEntity
$entity Nextras\Orm\Entity\IEntity | scalar
return Nextras\Orm\Entity\IEntity

countStored() public method

Counts collection entities without fetching them from storage.
public countStored ( ) : integer
return integer

doPersist() public method

DO NOT CALL THIS METHOD DIRECTLY.
public doPersist ( )

get() public method

Returns collection of all entity.
public get ( ) : Nextras\Orm\Collection\ICollection
return Nextras\Orm\Collection\ICollection

getEntitiesForPersistence() public method

Returns IEntity or IRelationshipContainer for persistence.
public getEntitiesForPersistence ( ) : mixed[]
return mixed[]

has() public method

public has ( Nextras\Orm\Entity\IEntity | scalar $entity ) : boolean
$entity Nextras\Orm\Entity\IEntity | scalar
return boolean

isLoaded() public method

Returns true if colletion was loaded.
public isLoaded ( ) : boolean
return boolean

isModified() public method

Returns true if relationship is modified.
public isModified ( ) : boolean
return boolean

remove() public method

Removes entity.
public remove ( Nextras\Orm\Entity\IEntity | scalar $entity ) : Nextras\Orm\Entity\IEntity
$entity Nextras\Orm\Entity\IEntity | scalar
return Nextras\Orm\Entity\IEntity

set() public method

Replaces all entities with given ones.
public set ( array $data ) : Nextras\Orm\Relationships\IRelationshipCollection
$data array
return Nextras\Orm\Relationships\IRelationshipCollection

setParent() public method

public setParent ( Nextras\Orm\Entity\IEntity $parent )
$parent Nextras\Orm\Entity\IEntity