PHP Class Bravo3\Orm\Services\AbstractManagerUtility

Show file Open project: bravo3/orm

Protected Properties

Property Type Description
$entity_manager EntityManager

Public Methods

Method Description
__construct ( EntityManager $entity_manager )

Protected Methods

Method Description
buildPrerequisites ( object $entity, Entity $metadata = null, Reader $reader = null, string $local_id = null ) : array Build requisite services & data if they were not provided
getDriver ( ) : Bravo3\Orm\Drivers\DriverInterface Get the driver belonging to the entity manager
getEntityId ( object $entity ) : string Get the full ID of an entity
getKeyScheme ( ) : Bravo3\Orm\KeySchemes\KeySchemeInterface Get the key scheme belonging to the entity manager
getMapper ( ) : Bravo3\Orm\Mappers\MapperInterface Get the mapper belonging to the entity manager
getRelationshipKey ( Relationship $relationship, string $source_id ) : string Get a relationship key, resolving table names accordingly
getSortIndexKey ( Relationship $relationship, $sort_name, $source_id ) : string Get a sort index key, resolving table names accordingly
getSourceTable ( Relationship $relationship ) : string Get the relationship source table name
getTableForClass ( string $class ) : string Get the table name for a given entity class
getTargetTable ( Relationship $relationship ) : string Get the relationship target table name

Method Details

__construct() public method

public __construct ( EntityManager $entity_manager )
$entity_manager EntityManager

buildPrerequisites() protected method

Build requisite services & data if they were not provided
protected buildPrerequisites ( object $entity, Entity $metadata = null, Reader $reader = null, string $local_id = null ) : array
$entity object
$metadata Bravo3\Orm\Mappers\Metadata\Entity
$reader Bravo3\Orm\Services\Io\Reader
$local_id string
return array

getDriver() protected method

Get the driver belonging to the entity manager
protected getDriver ( ) : Bravo3\Orm\Drivers\DriverInterface
return Bravo3\Orm\Drivers\DriverInterface

getEntityId() protected method

Get the full ID of an entity
protected getEntityId ( object $entity ) : string
$entity object
return string

getKeyScheme() protected method

Get the key scheme belonging to the entity manager
protected getKeyScheme ( ) : Bravo3\Orm\KeySchemes\KeySchemeInterface
return Bravo3\Orm\KeySchemes\KeySchemeInterface

getMapper() protected method

Get the mapper belonging to the entity manager
protected getMapper ( ) : Bravo3\Orm\Mappers\MapperInterface
return Bravo3\Orm\Mappers\MapperInterface

getRelationshipKey() protected method

Get a relationship key, resolving table names accordingly
protected getRelationshipKey ( Relationship $relationship, string $source_id ) : string
$relationship Bravo3\Orm\Mappers\Metadata\Relationship
$source_id string
return string

getSortIndexKey() protected method

Get a sort index key, resolving table names accordingly
protected getSortIndexKey ( Relationship $relationship, $sort_name, $source_id ) : string
$relationship Bravo3\Orm\Mappers\Metadata\Relationship
$sort_name
$source_id
return string

getSourceTable() protected method

Get the relationship source table name
protected getSourceTable ( Relationship $relationship ) : string
$relationship Bravo3\Orm\Mappers\Metadata\Relationship
return string

getTableForClass() protected method

Get the table name for a given entity class
protected getTableForClass ( string $class ) : string
$class string
return string

getTargetTable() protected method

Get the relationship target table name
protected getTargetTable ( Relationship $relationship ) : string
$relationship Bravo3\Orm\Mappers\Metadata\Relationship
return string

Property Details

$entity_manager protected property

protected EntityManager,Bravo3\Orm\Services $entity_manager
return EntityManager