PHP Interface Nextras\Orm\Mapper\IMapper

Mostra file Open project: nextras/orm Interface Usage Examples

Public Methods

Method Description
clearCollectionCache ( ) Clears cache object for collection.
createCollectionManyHasMany ( Nextras\Orm\Mapper\IMapper $mapper, PropertyMetadata $metadata, Nextras\Orm\Entity\IEntity $parent ) : Nextras\Orm\Collection\ICollection Creates collection with ManyHasMany mapper.
createCollectionManyHasOne ( PropertyMetadata $metadata, Nextras\Orm\Entity\IEntity $parent ) : Nextras\Orm\Collection\ICollection Creates collection with HasOne mapper.
createCollectionOneHasMany ( PropertyMetadata $metadata, Nextras\Orm\Entity\IEntity $parent ) : Nextras\Orm\Collection\ICollection Creates collection with OneHasMany mapper.
createCollectionOneHasOne ( PropertyMetadata $metadata, Nextras\Orm\Entity\IEntity $parent ) : Nextras\Orm\Collection\ICollection Creates collection with OneHasOneDirected mapper.
findAll ( ) : Nextras\Orm\Collection\ICollection Returns all entities.
flush ( ) : void
getCollectionCache ( ) : stdClass Returns cache object for collections.
getRepository ( ) : Nextras\Orm\Repository\IRepository
getStorageReflection ( ) : Nextras\Orm\StorageReflection\IStorageReflection
getTableName ( ) : string
persist ( Nextras\Orm\Entity\IEntity $entity ) : Nextras\Orm\Entity\IEntity
remove ( Nextras\Orm\Entity\IEntity $entity ) : boolean
rollback ( ) : void
setRepository ( Nextras\Orm\Repository\IRepository $repository )
toCollection ( $data ) : Nextras\Orm\Collection\ICollection Transforms value from mapper, which is not a collection.

Method Details

clearCollectionCache() public method

Clears cache object for collection.

createCollectionManyHasMany() public method

Creates collection with ManyHasMany mapper.
public createCollectionManyHasMany ( Nextras\Orm\Mapper\IMapper $mapper, PropertyMetadata $metadata, Nextras\Orm\Entity\IEntity $parent ) : Nextras\Orm\Collection\ICollection
$mapper Nextras\Orm\Mapper\IMapper
$metadata Nextras\Orm\Entity\Reflection\PropertyMetadata
$parent Nextras\Orm\Entity\IEntity
return Nextras\Orm\Collection\ICollection

createCollectionManyHasOne() public method

Creates collection with HasOne mapper.
public createCollectionManyHasOne ( PropertyMetadata $metadata, Nextras\Orm\Entity\IEntity $parent ) : Nextras\Orm\Collection\ICollection
$metadata Nextras\Orm\Entity\Reflection\PropertyMetadata
$parent Nextras\Orm\Entity\IEntity
return Nextras\Orm\Collection\ICollection

createCollectionOneHasMany() public method

Creates collection with OneHasMany mapper.
public createCollectionOneHasMany ( PropertyMetadata $metadata, Nextras\Orm\Entity\IEntity $parent ) : Nextras\Orm\Collection\ICollection
$metadata Nextras\Orm\Entity\Reflection\PropertyMetadata
$parent Nextras\Orm\Entity\IEntity
return Nextras\Orm\Collection\ICollection

createCollectionOneHasOne() public method

Creates collection with OneHasOneDirected mapper.
public createCollectionOneHasOne ( PropertyMetadata $metadata, Nextras\Orm\Entity\IEntity $parent ) : Nextras\Orm\Collection\ICollection
$metadata Nextras\Orm\Entity\Reflection\PropertyMetadata
$parent Nextras\Orm\Entity\IEntity
return Nextras\Orm\Collection\ICollection

findAll() public method

Returns all entities.
public findAll ( ) : Nextras\Orm\Collection\ICollection
return Nextras\Orm\Collection\ICollection

flush() public method

See also: IRepository::flush()
public flush ( ) : void
return void

getCollectionCache() public method

Returns cache object for collections.
public getCollectionCache ( ) : stdClass
return stdClass

getRepository() public method

public getRepository ( ) : Nextras\Orm\Repository\IRepository
return Nextras\Orm\Repository\IRepository

getStorageReflection() public method

public getStorageReflection ( ) : Nextras\Orm\StorageReflection\IStorageReflection
return Nextras\Orm\StorageReflection\IStorageReflection

getTableName() public method

public getTableName ( ) : string
return string

persist() public method

See also: IRepository::persist()
public persist ( Nextras\Orm\Entity\IEntity $entity ) : Nextras\Orm\Entity\IEntity
$entity Nextras\Orm\Entity\IEntity
return Nextras\Orm\Entity\IEntity

remove() public method

See also: IRepository::remove()
public remove ( Nextras\Orm\Entity\IEntity $entity ) : boolean
$entity Nextras\Orm\Entity\IEntity
return boolean

rollback() public method

See also: IRepository::roolback()
public rollback ( ) : void
return void

setRepository() public method

public setRepository ( Nextras\Orm\Repository\IRepository $repository )
$repository Nextras\Orm\Repository\IRepository

toCollection() public method

Transforms value from mapper, which is not a collection.
public toCollection ( $data ) : Nextras\Orm\Collection\ICollection
return Nextras\Orm\Collection\ICollection