PHP Interface Storm\Core\Object\IEntityMap

Author: Elliot Levin ([email protected])
Exibir arquivo Open project: timetoogo/penumbra Interface Usage Examples

Public Methods

Method Description
Apply ( Domain $Domain, object $Entity, PropertyData $PropertyData ) : void Applies the supplied property data to the supplied entity instance.
Discard ( UnitOfWork $UnitOfWork, object $Entity ) : DiscardenceData Discards an entity's relationships to the supplied unit of work and returns the discardence data.
DiscardenceData ( array $DiscardenceData = [] ) : DiscardenceData
GetCollectionProperties ( ) : Storm\Core\Object\ICollectionProperty[]
GetDataProperties ( ) : Storm\Core\Object\IDataProperty[]
GetEntityProperties ( ) : Storm\Core\Object\IEntityProperty[]
GetEntityType ( ) : string
GetIdentityProperties ( ) : Storm\Core\Object\IProperty[]
GetProperties ( ) : Storm\Core\Object\IProperty[]
GetProperty ( string $Identifier ) : Storm\Core\Object\IProperty | null Gets a property by its identifier
GetRelationshipProperties ( ) : Storm\Core\Object\IRelationshipProperty[]
HasIdentity ( object $Entity ) : boolean Whether or not the entity has a full identity.
HasIdentityProperty ( string $Identifier ) : boolean Whether or not this map contains a property with the supplied identifier
HasProperty ( string $Identifier ) : boolean Whether or not this map contains a property withthe supplied identifier
HasRelationshipProperty ( string $Identifier ) : void Whether or not this map contains a relationship property with the supplied identifier
Identity ( object | null $Entity = null ) : Identity If the entity is null returns a new blank identity otherwise returns the identity of the supplied entity.
InititalizeProperties ( Domain $Domain ) : void Initializes the properties of the entity within the context of the parent domain.
Is ( Storm\Core\Object\IEntityMap $OtherEntityMap ) : boolean Whether or not this and the supplied entity map represent the same entity.
LoadEntity ( Domain $Domain, RevivalData $RevivalData, object $Entity ) : void Loads an entity instance with the supplied revival data.
Persist ( UnitOfWork $UnitOfWork, object $Entity ) : PersistenceData Persists an entity's relationships to the supplied unit of work and returns the persistence data.
PersistRelationships ( UnitOfWork $UnitOfWork, object $Entity ) : PersistenceData Persists an entity's relationships to the supplied unit of work.
PersistanceData ( array $PersistanceData = [] ) : PersistenceData
RevivalData ( array $RevivalData = [] ) : RevivalData
ReviveEntities ( Domain $Domain, array $RevivalDataArray ) : object[] Revives an array of entities from the supplied array of revival data.

Method Details

Apply() public method

Applies the supplied property data to the supplied entity instance.
public Apply ( Domain $Domain, object $Entity, PropertyData $PropertyData ) : void
$Domain Domain The object domain to revive in entity in.
$Entity object The entity to apply the property data
$PropertyData PropertyData The property data apply
return void

Discard() public method

Discards an entity's relationships to the supplied unit of work and returns the discardence data.
public Discard ( UnitOfWork $UnitOfWork, object $Entity ) : DiscardenceData
$UnitOfWork UnitOfWork The unit of work to discard from
$Entity object The entity to discard
return DiscardenceData The discardence data of the entity

DiscardenceData() public method

public DiscardenceData ( array $DiscardenceData = [] ) : DiscardenceData
$DiscardenceData array
return DiscardenceData

GetCollectionProperties() public method

public GetCollectionProperties ( ) : Storm\Core\Object\ICollectionProperty[]
return Storm\Core\Object\ICollectionProperty[]

GetDataProperties() public method

public GetDataProperties ( ) : Storm\Core\Object\IDataProperty[]
return Storm\Core\Object\IDataProperty[]

GetEntityProperties() public method

public GetEntityProperties ( ) : Storm\Core\Object\IEntityProperty[]
return Storm\Core\Object\IEntityProperty[]

GetEntityType() public method

public GetEntityType ( ) : string
return string

GetIdentityProperties() public method

public GetIdentityProperties ( ) : Storm\Core\Object\IProperty[]
return Storm\Core\Object\IProperty[]

GetProperties() public method

public GetProperties ( ) : Storm\Core\Object\IProperty[]
return Storm\Core\Object\IProperty[]

GetProperty() public method

Gets a property by its identifier
public GetProperty ( string $Identifier ) : Storm\Core\Object\IProperty | null
$Identifier string The property identifier
return Storm\Core\Object\IProperty | null The matched property

GetRelationshipProperties() public method

public GetRelationshipProperties ( ) : Storm\Core\Object\IRelationshipProperty[]
return Storm\Core\Object\IRelationshipProperty[]

HasIdentity() public method

Whether or not the entity has a full identity.
public HasIdentity ( object $Entity ) : boolean
$Entity object The entity to check
return boolean

HasIdentityProperty() public method

Whether or not this map contains a property with the supplied identifier
public HasIdentityProperty ( string $Identifier ) : boolean
$Identifier string The property identifier
return boolean

HasProperty() public method

Whether or not this map contains a property withthe supplied identifier
public HasProperty ( string $Identifier ) : boolean
$Identifier string The property identifier
return boolean

HasRelationshipProperty() public method

Whether or not this map contains a relationship property with the supplied identifier
public HasRelationshipProperty ( string $Identifier ) : void
$Identifier string The property identifier
return void

Identity() public method

If the entity is null returns a new blank identity otherwise returns the identity of the supplied entity.
public Identity ( object | null $Entity = null ) : Identity
$Entity object | null
return Identity The entity's identity

InititalizeProperties() public method

Initializes the properties of the entity within the context of the parent domain.
public InititalizeProperties ( Domain $Domain ) : void
$Domain Domain The parent domain
return void

Is() public method

Whether or not this and the supplied entity map represent the same entity.
public Is ( Storm\Core\Object\IEntityMap $OtherEntityMap ) : boolean
$OtherEntityMap Storm\Core\Object\IEntityMap Another entity map
return boolean

LoadEntity() public method

Loads an entity instance with the supplied revival data.
public LoadEntity ( Domain $Domain, RevivalData $RevivalData, object $Entity ) : void
$Domain Domain
$RevivalData RevivalData The revival data to load the entity with
$Entity object The entity to load
return void

Persist() public method

Persists an entity's relationships to the supplied unit of work and returns the persistence data.
public Persist ( UnitOfWork $UnitOfWork, object $Entity ) : PersistenceData
$UnitOfWork UnitOfWork The unit of work to persist to
$Entity object The entity to persist
return PersistenceData The persistence data of the entity

PersistRelationships() public method

Persists an entity's relationships to the supplied unit of work.
public PersistRelationships ( UnitOfWork $UnitOfWork, object $Entity ) : PersistenceData
$UnitOfWork UnitOfWork The unit of work to persist to
$Entity object The entity to persist
return PersistenceData The persistence data of the entity

PersistanceData() public method

public PersistanceData ( array $PersistanceData = [] ) : PersistenceData
$PersistanceData array
return PersistenceData

RevivalData() public method

public RevivalData ( array $RevivalData = [] ) : RevivalData
$RevivalData array
return RevivalData

ReviveEntities() public method

Revives an array of entities from the supplied array of revival data.
public ReviveEntities ( Domain $Domain, array $RevivalDataArray ) : object[]
$Domain Domain
$RevivalDataArray array The array of revival data
return object[] The revived entities