PHP Class Blast\Orm\Entity\Definition

Inheritance: implements Blast\Orm\Entity\DefinitionInterface, implements Blast\Orm\EventEmitterFactoryInterface, implements Blast\Orm\MapperFactoryInterface, use trait League\Event\EmitterAwareTrait, use trait Blast\Orm\EventEmitterFactoryTrait, use trait Blast\Orm\MapperFactoryTrait
Afficher le fichier Open project: phpthinktank/blast-orm Class Usage Examples

Méthodes publiques

Méthode Description
getConfiguration ( ) : array
getEmitter ( ) : ArrayObject | object Load event emitter. If entity has events and no emitter exists, create a new emitter.
getEntity ( ) : ArrayObject | object Get the entity object.
getEntityCollection ( ) : SplStack | object Get the custom entity collection
getFields ( ) : Doctrine\DBAL\Schema\Column[] Get fields
getIndexes ( ) : Doctrine\DBAL\Schema\Index[] Get indexes
getMapper ( ) : Blast\Orm\MapperInterface Get entity mapper
getPrimaryKeyName ( ) : string Get name of primary key
getRelations ( ) : Blast\Orm\Relations\RelationInterface[] Get an array of relations
getTableName ( boolean $withPrefix = true ) : string Get table name
setConfiguration ( array $configuration ) : Definition Add additional configuration. Configuration will be merged into

Private Methods

Méthode Description
mergeConfiguration ( array $configuration ) Merge partial configuration into definition configuration. Normalize partial configuration keys before add them to configuration. Add custom configuration after adding known configuration.
processFields ( ) Setup entity fields and determine undefined fields from entity with type string

Method Details

getConfiguration() public méthode

public getConfiguration ( ) : array
Résultat array

getEmitter() public méthode

Load event emitter. If entity has events and no emitter exists, create a new emitter.
public getEmitter ( ) : ArrayObject | object
Résultat ArrayObject | object

getEntity() public méthode

Get the entity object.
public getEntity ( ) : ArrayObject | object
Résultat ArrayObject | object

getEntityCollection() public méthode

Get the custom entity collection
public getEntityCollection ( ) : SplStack | object
Résultat SplStack | object

getFields() public méthode

Get fields
public getFields ( ) : Doctrine\DBAL\Schema\Column[]
Résultat Doctrine\DBAL\Schema\Column[]

getIndexes() public méthode

Get indexes
public getIndexes ( ) : Doctrine\DBAL\Schema\Index[]
Résultat Doctrine\DBAL\Schema\Index[]

getMapper() public méthode

Get entity mapper
public getMapper ( ) : Blast\Orm\MapperInterface
Résultat Blast\Orm\MapperInterface

getPrimaryKeyName() public méthode

Get name of primary key
public getPrimaryKeyName ( ) : string
Résultat string

getRelations() public méthode

Get an array of relations
public getRelations ( ) : Blast\Orm\Relations\RelationInterface[]
Résultat Blast\Orm\Relations\RelationInterface[]

getTableName() public méthode

Add prefix if if $withPrefix is true and a prefix exists
public getTableName ( boolean $withPrefix = true ) : string
$withPrefix boolean
Résultat string

setConfiguration() public méthode

Add additional configuration. Configuration will be merged into
public setConfiguration ( array $configuration ) : Definition
$configuration array
Résultat Definition