PHP 클래스 Storm\Core\Mapping\DomainDatabaseMap

저자: Elliot Levin ([email protected])
파일 보기 프로젝트 열기: timetoogo/penumbra 1 사용 예제들

공개 메소드들

메소드 설명
Commit ( array $EntitiesToPersist, array $ProceduresToExecute, array $EntitiesToDiscard, array $CriteriaToDiscard ) : void Commits the supplied operations to the underlying database within a transactional scope.
Factory ( ) This class can be very expensive to instantiate, so this provides a factory closure if required.
GetDatabase ( ) : Database
GetDomain ( ) : Domain
GetEntityRelationalMap ( string $EntityType ) : Storm\Core\Mapping\IEntityRelationalMap | null Gets the registered relational map for the given entity type.
GetEntityRelationalMapByPrimaryKeyTable ( string $TableName ) : IEntityRelationalMap:null Gets the registered relational map for the given primary key table name.
HasEntityRelationalMap ( string $EntityType ) : boolean Returns if this contains an relational map for the given type of entity.
Load ( Storm\Core\Object\IRequest $ObjectRequest ) : array | object | null Loads all entities that are specified from the given request instance.
MapDiscardedRelationships ( Storm\Core\Mapping\IEntityRelationalMap $EntityRelationalMap, array $ObjectDiscardedRelationships ) : DiscardedRelationship[]
MapEntityToRelationalRequest ( string $EntityType, Request $RelationalRequest, array $AlreadyKnownProperties = [] ) : void
MapPersistedRelationships ( UnitOfWork $UnitOfWork, Transaction $Transaction, Storm\Core\Mapping\IEntityRelationalMap $EntityRelationalMap, array $ObjectPersistedRelationships ) : PersistedRelationship[]
MapProcedure ( Storm\Core\Object\IProcedure $ObjectProcedure ) : Procedure
MapRelationshipChanges ( UnitOfWork $UnitOfWork, Transaction $Transaction, Storm\Core\Mapping\IEntityRelationalMap $EntityRelationalMap, array $ObjectRelationshipChanges ) : RelationshipChange
MapRequest ( Storm\Core\Object\IRequest $ObjectRequest ) : Request
MapResultRowDataToRevivalData ( $EntityType, ResultRow $ResultRow )
MapResultRowsToRevivalData ( Storm\Core\Mapping\IEntityRelationalMap $EntityRelationalMap, array $ResultRowArray, array $RevivalDataArray )
MapRowsToRevivalData ( string $EntityType, array $ResultRows ) : RevivalData[]
__construct ( )

보호된 메소드들

메소드 설명
Database ( ) : Database The method to specify the database instance.
Domain ( ) : Domain The method to specify the domain instance.
MapExpression ( Storm\Core\Mapping\IEntityRelationalMap $EntityRelationalMap, Expression $Expression ) : Expression[]
RegisterEntityRelationalMaps ( Registrar $Registrar ) This is where you register your EntityRelationalMap classes.
VerifyEntityTypeIsMapped ( string $EntityType ) : Storm\Core\Mapping\IEntityRelationalMap Verifies that an entity type is mapped and returns the relational map if is found.

비공개 메소드들

메소드 설명
AddEntityRelationMap ( Storm\Core\Mapping\IEntityRelationalMap $EntityRelationalMap ) Adds an entity relational map instance to this domain database map.
MapCriterion ( Storm\Core\Mapping\IEntityRelationalMap $EntityRelationalMap, Storm\Core\Object\ICriterion $ObjectCriterion, Criterion $RelationalCriterion ) : void
MapEntityDataToTransaction ( UnitOfWork $UnitOfWork, Transaction $Transaction, Storm\Core\Mapping\IEntityRelationalMap $EntityRelationalMap, array $EntityDataArray ) : Storm\Core\Relational\ResultRows[]
MapExpressions ( Storm\Core\Mapping\IEntityRelationalMap $EntityRelationalMap, array $Expressions ) : Expression[]
MapObjectCriterion ( Storm\Core\Object\ICriterion $ObjectCriterion ) : Criterion
MapPersistenceDataToTransaction ( UnitOfWork $UnitOfWork, Transaction $Transaction, array $PersistenceDataArray ) : Storm\Core\Relational\ResultRows[]
MapPropetiesToRelationalRequest ( Storm\Core\Mapping\IEntityRelationalMap $EntityRelationalMap, Request $RelationalRequest, array $Properties = null ) : void
MapUnitOfWorkToTransaction ( UnitOfWork $UnitOfWork, Transaction $Transaction ) : void

메소드 상세

Commit() 최종 공개 메소드

Commits the supplied operations to the underlying database within a transactional scope.
final public Commit ( array $EntitiesToPersist, array $ProceduresToExecute, array $EntitiesToDiscard, array $CriteriaToDiscard ) : void
$EntitiesToPersist array The entities to persist
$ProceduresToExecute array The procedures to execute
$EntitiesToDiscard array The entities to discard
$CriteriaToDiscard array The criteria of entities to discard
리턴 void

Database() 추상적인 보호된 메소드

The method to specify the database instance.
abstract protected Database ( ) : Database
리턴 Storm\Core\Relational\Database

Domain() 추상적인 보호된 메소드

The method to specify the domain instance.
abstract protected Domain ( ) : Domain
리턴 Storm\Core\Object\Domain

Factory() 최종 공개 정적인 메소드

This class can be very expensive to instantiate, so this provides a factory closure if required.
final public static Factory ( )

GetDatabase() 최종 공개 메소드

final public GetDatabase ( ) : Database
리턴 Storm\Core\Relational\Database The Database instance

GetDomain() 최종 공개 메소드

final public GetDomain ( ) : Domain
리턴 Storm\Core\Object\Domain The Domain instance

GetEntityRelationalMap() 최종 공개 메소드

Gets the registered relational map for the given entity type.
final public GetEntityRelationalMap ( string $EntityType ) : Storm\Core\Mapping\IEntityRelationalMap | null
$EntityType string The type of the entity (sub classes will resolve)
리턴 Storm\Core\Mapping\IEntityRelationalMap | null The relational map or null if not found

GetEntityRelationalMapByPrimaryKeyTable() 최종 공개 메소드

Gets the registered relational map for the given primary key table name.
final public GetEntityRelationalMapByPrimaryKeyTable ( string $TableName ) : IEntityRelationalMap:null
$TableName string The name of primary key table.
리턴 IEntityRelationalMap:null

HasEntityRelationalMap() 최종 공개 메소드

Returns if this contains an relational map for the given type of entity.
final public HasEntityRelationalMap ( string $EntityType ) : boolean
$EntityType string The type of the entity
리턴 boolean

Load() 최종 공개 메소드

Loads all entities that are specified from the given request instance.
final public Load ( Storm\Core\Object\IRequest $ObjectRequest ) : array | object | null
$ObjectRequest Storm\Core\Object\IRequest The request to load
리턴 array | object | null Depending on the supplied request, either all the entities are returned as an array or the first is returned or null if none are found.

MapDiscardedRelationships() 최종 공개 메소드

final public MapDiscardedRelationships ( Storm\Core\Mapping\IEntityRelationalMap $EntityRelationalMap, array $ObjectDiscardedRelationships ) : DiscardedRelationship[]
$EntityRelationalMap Storm\Core\Mapping\IEntityRelationalMap
$ObjectDiscardedRelationships array
리턴 Storm\Core\Relational\DiscardedRelationship[]

MapEntityToRelationalRequest() 최종 공개 메소드

final public MapEntityToRelationalRequest ( string $EntityType, Request $RelationalRequest, array $AlreadyKnownProperties = [] ) : void
$EntityType string The type of entity
$RelationalRequest Storm\Core\Relational\Request The request to add to
$AlreadyKnownProperties array
리턴 void

MapExpression() 추상적인 보호된 메소드

abstract protected MapExpression ( Storm\Core\Mapping\IEntityRelationalMap $EntityRelationalMap, Expression $Expression ) : Expression[]
$EntityRelationalMap Storm\Core\Mapping\IEntityRelationalMap
$Expression Storm\Core\Object\Expressions\Expression
리턴 Storm\Core\Relational\Expressions\Expression[] The equivalent expressions

MapPersistedRelationships() 최종 공개 메소드

final public MapPersistedRelationships ( UnitOfWork $UnitOfWork, Transaction $Transaction, Storm\Core\Mapping\IEntityRelationalMap $EntityRelationalMap, array $ObjectPersistedRelationships ) : PersistedRelationship[]
$UnitOfWork Storm\Core\Object\UnitOfWork
$Transaction Storm\Core\Relational\Transaction
$EntityRelationalMap Storm\Core\Mapping\IEntityRelationalMap
$ObjectPersistedRelationships array
리턴 Storm\Core\Relational\PersistedRelationship[]

MapProcedure() 최종 공개 메소드

final public MapProcedure ( Storm\Core\Object\IProcedure $ObjectProcedure ) : Procedure
$ObjectProcedure Storm\Core\Object\IProcedure The object procedure
리턴 Storm\Core\Relational\Procedure The equivalent relational procedure

MapRelationshipChanges() 최종 공개 메소드

final public MapRelationshipChanges ( UnitOfWork $UnitOfWork, Transaction $Transaction, Storm\Core\Mapping\IEntityRelationalMap $EntityRelationalMap, array $ObjectRelationshipChanges ) : RelationshipChange
$UnitOfWork Storm\Core\Object\UnitOfWork
$Transaction Storm\Core\Relational\Transaction
$EntityRelationalMap Storm\Core\Mapping\IEntityRelationalMap
$ObjectRelationshipChanges array
리턴 Storm\Core\Relational\RelationshipChange

MapRequest() 최종 공개 메소드

final public MapRequest ( Storm\Core\Object\IRequest $ObjectRequest ) : Request
$ObjectRequest Storm\Core\Object\IRequest The object request
리턴 Storm\Core\Relational\Request The equivalent relational request

MapResultRowDataToRevivalData() 최종 공개 메소드

final public MapResultRowDataToRevivalData ( $EntityType, ResultRow $ResultRow )
$ResultRow Storm\Core\Relational\ResultRow

MapResultRowsToRevivalData() 최종 공개 메소드

final public MapResultRowsToRevivalData ( Storm\Core\Mapping\IEntityRelationalMap $EntityRelationalMap, array $ResultRowArray, array $RevivalDataArray )
$EntityRelationalMap Storm\Core\Mapping\IEntityRelationalMap The entity relational map
$ResultRowArray array
$RevivalDataArray array

MapRowsToRevivalData() 최종 공개 메소드

final public MapRowsToRevivalData ( string $EntityType, array $ResultRows ) : RevivalData[]
$EntityType string The type of entity to revive as
$ResultRows array The result row to ma
리턴 Storm\Core\Object\RevivalData[] The mapped revival data

RegisterEntityRelationalMaps() 추상적인 보호된 메소드

This is where you register your EntityRelationalMap classes.
abstract protected RegisterEntityRelationalMaps ( Registrar $Registrar )
$Registrar Storm\Core\Containers\Registrar

VerifyEntityTypeIsMapped() 최종 보호된 메소드

Verifies that an entity type is mapped and returns the relational map if is found.
final protected VerifyEntityTypeIsMapped ( string $EntityType ) : Storm\Core\Mapping\IEntityRelationalMap
$EntityType string The entity type
리턴 Storm\Core\Mapping\IEntityRelationalMap The registered entity relational map

__construct() 공개 메소드

public __construct ( )