PHP 인터페이스 Nextras\Orm\Model\IModel

파일 보기 프로젝트 열기: nextras/orm 0 사용 예제들

공개 메소드들

메소드 설명
clearIdentityMapAndCaches ( $areYouSure ) USE ONLY IF YOU ARE SURE YOU KNOW WHAT ARE YOU DOING.
flush ( ) : void Flushes all persisted changes in repositories.
getMetadataStorage ( ) : MetadataStorage Returns entity metadata storage.
getRepository ( string $className ) : Nextras\Orm\Repository\IRepository Returns repository by repository class.
getRepositoryByName ( string $name ) : Nextras\Orm\Repository\IRepository Returns repository by repository name.
getRepositoryForEntity ( Nextras\Orm\Entity\IEntity | string $entity ) : Nextras\Orm\Repository\IRepository Returns repository associated for entity type.
hasRepository ( string $className ) : boolean Returns true if repository class is attached to model.
hasRepositoryByName ( string $name ) : boolean Returns true if repository with name is attached to model.
persist ( Nextras\Orm\Entity\IEntity $entity, $withCascade = true ) : Nextras\Orm\Entity\IEntity Persist the entity with cascade.
persistAndFlush ( Nextras\Orm\Entity\IEntity $entity ) : Nextras\Orm\Entity\IEntity Persist the entity with cascade and flushes the model.
remove ( Nextras\Orm\Entity\IEntity $entity, boolean $withCascade = true ) : mixed

메소드 상세

clearIdentityMapAndCaches() 공개 메소드

Clears repository identity map and other possible caches. Make sure that all references to already used entites are released, this makes possible to free the memory for garbage collector. Orm will not allow you to work with these entities anymore.
public clearIdentityMapAndCaches ( $areYouSure )

flush() 공개 메소드

Flushes all persisted changes in repositories.
public flush ( ) : void
리턴 void

getMetadataStorage() 공개 메소드

Returns entity metadata storage.
public getMetadataStorage ( ) : MetadataStorage
리턴 MetadataStorage

getRepository() 공개 메소드

Returns repository by repository class.
public getRepository ( string $className ) : Nextras\Orm\Repository\IRepository
$className string
리턴 Nextras\Orm\Repository\IRepository

getRepositoryByName() 공개 메소드

Returns repository by repository name.
public getRepositoryByName ( string $name ) : Nextras\Orm\Repository\IRepository
$name string
리턴 Nextras\Orm\Repository\IRepository

getRepositoryForEntity() 공개 메소드

Returns repository associated for entity type.
public getRepositoryForEntity ( Nextras\Orm\Entity\IEntity | string $entity ) : Nextras\Orm\Repository\IRepository
$entity Nextras\Orm\Entity\IEntity | string
리턴 Nextras\Orm\Repository\IRepository

hasRepository() 공개 메소드

Returns true if repository class is attached to model.
public hasRepository ( string $className ) : boolean
$className string
리턴 boolean

hasRepositoryByName() 공개 메소드

Returns true if repository with name is attached to model.
public hasRepositoryByName ( string $name ) : boolean
$name string
리턴 boolean

persist() 공개 메소드

Persist the entity with cascade.
public persist ( Nextras\Orm\Entity\IEntity $entity, $withCascade = true ) : Nextras\Orm\Entity\IEntity
$entity Nextras\Orm\Entity\IEntity
리턴 Nextras\Orm\Entity\IEntity

persistAndFlush() 공개 메소드

Persist the entity with cascade and flushes the model.
public persistAndFlush ( Nextras\Orm\Entity\IEntity $entity ) : Nextras\Orm\Entity\IEntity
$entity Nextras\Orm\Entity\IEntity
리턴 Nextras\Orm\Entity\IEntity

remove() 공개 메소드

public remove ( Nextras\Orm\Entity\IEntity $entity, boolean $withCascade = true ) : mixed
$entity Nextras\Orm\Entity\IEntity
$withCascade boolean
리턴 mixed