PHP Класс Bolt\Storage\Mapping\MetadataDriver

Автор: Ross Riley ([email protected])
Наследование: implements Doctrine\Common\Persistence\Mapping\Driver\MappingDriver
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$aliases array
$contenttypes array
$defaultAliases array
$fallbackEntity A default entity for any table not matched
$initialized boolean
$metadata metadata mappings
$namingStrategy Bolt\Storage\NamingStrategy
$schemaManager Bolt\Storage\Database\Schema\Manager
$taxonomies taxonomy configuration
$typemap array
$unmapped array Keeps a reference of which metadata is not mapped to a specific entity.

Открытые методы

Метод Описание
__construct ( Manager $schemaManager, ConfigurationValueProxy $contenttypes, ConfigurationValueProxy $taxonomies, array $typemap, Bolt\Storage\NamingStrategy $namingStrategy = null ) Constructor.
getAliases ( ) : array Getter for aliases
getAllClassNames ( )
getClassMetadata ( string $className ) : Doctrine\Common\Persistence\Mapping\ClassMetadata | false Returns the metadata for a given class name.
getContentTypeFromAlias ( $alias, boolean $forceSlug = false ) : string Given a tablename or slug get the correct Bolt keyname from the config
getFieldMetadata ( $contenttype, $column, $field = null )
getFieldTypeFor ( string $name, Doctrine\DBAL\Schema\Column $column, null $field = null ) : string Get the field type for a given column.
getRepeaterMapping ( array $config ) : array This is a helper method to get a correct mapping from an array config. It's designed to take raw array config to generate a correct format mapping for repeaters.
getTaxonomyConfig ( ) : array
getUnmapped ( ) : array Gets a list of tables that are not mapped to specific entities.
initialize ( ) Reads the schema from Bolt\Storage\Database\Schema\Manager and creates mapping data
initializeDefaultAliases ( ) This seeds the defaultAliases array with the correctly prefixed mappings
initializeShortAliases ( ) Setup some short aliases so non prefixed keys can be used to get metadata
isTransient ( string $className ) : boolean Not implemented, always returns false.
loadMetadataForClass ( $className, Doctrine\Common\Persistence\Mapping\ClassMetadata $metadata = null )
loadMetadataForFields ( array $fields )
resolveClassName ( string $alias ) : string Method will try to find an entity class name to handle data, alternatively falling back to $this->fallbackEntity
setContentFields ( $contentKey, $className, $table )
setDefaultAlias ( string $alias, string $entity ) : void Adds an alias mapping from an internal name to a Fully Qualified Entity.
setIncomingRelations ( $contentKey, $className )
setRelations ( string $contentKey, string $className, Doctrine\DBAL\Schema\Table $table ) Set the relationship.
setRepeaters ( string $contentKey, string $className, array $inputData = null ) : array | null
setTaxonomies ( string $contentKey, string $className, Doctrine\DBAL\Schema\Table $table ) Set the taxonomy.
setTemplatefields ( string $contentKey, string $className, Doctrine\DBAL\Schema\Table $table ) Setup a templatefields field if needed.

Защищенные методы

Метод Описание
loadMetadataForTable ( Doctrine\DBAL\Schema\Table $table ) Load the metadata for a table.
normalizeClassName ( $className ) : string Performs basic normalisation on a searched for class name to make sure it conforms to lookup format.

Описание методов

__construct() публичный Метод

Constructor.
public __construct ( Manager $schemaManager, ConfigurationValueProxy $contenttypes, ConfigurationValueProxy $taxonomies, array $typemap, Bolt\Storage\NamingStrategy $namingStrategy = null )
$schemaManager Bolt\Storage\Database\Schema\Manager
$contenttypes Bolt\Configuration\ConfigurationValueProxy
$taxonomies Bolt\Configuration\ConfigurationValueProxy
$typemap array
$namingStrategy Bolt\Storage\NamingStrategy

getAliases() публичный Метод

Getter for aliases
public getAliases ( ) : array
Результат array

getAllClassNames() публичный Метод

public getAllClassNames ( )

getClassMetadata() публичный Метод

Returns the metadata for a given class name.
public getClassMetadata ( string $className ) : Doctrine\Common\Persistence\Mapping\ClassMetadata | false
$className string
Результат Doctrine\Common\Persistence\Mapping\ClassMetadata | false The class metadata.

getContentTypeFromAlias() публичный Метод

Given a tablename or slug get the correct Bolt keyname from the config
public getContentTypeFromAlias ( $alias, boolean $forceSlug = false ) : string
$alias
$forceSlug boolean
Результат string $key

getFieldMetadata() публичный Метод

public getFieldMetadata ( $contenttype, $column, $field = null )

getFieldTypeFor() публичный Метод

Get the field type for a given column.
public getFieldTypeFor ( string $name, Doctrine\DBAL\Schema\Column $column, null $field = null ) : string
$name string
$column Doctrine\DBAL\Schema\Column
$field null Optional field value for repeaters/array based columns
Результат string

getRepeaterMapping() публичный Метод

This is a helper method to get a correct mapping from an array config. It's designed to take raw array config to generate a correct format mapping for repeaters.
public getRepeaterMapping ( array $config ) : array
$config array
Результат array

getTaxonomyConfig() публичный Метод

public getTaxonomyConfig ( ) : array
Результат array

getUnmapped() публичный Метод

Gets a list of tables that are not mapped to specific entities.
public getUnmapped ( ) : array
Результат array

initialize() публичный Метод

Reads the schema from Bolt\Storage\Database\Schema\Manager and creates mapping data
public initialize ( )

initializeDefaultAliases() публичный Метод

This seeds the defaultAliases array with the correctly prefixed mappings

initializeShortAliases() публичный Метод

Setup some short aliases so non prefixed keys can be used to get metadata

isTransient() публичный Метод

Not implemented, always returns false.
public isTransient ( string $className ) : boolean
$className string
Результат boolean

loadMetadataForClass() публичный Метод

public loadMetadataForClass ( $className, Doctrine\Common\Persistence\Mapping\ClassMetadata $metadata = null )
$metadata Doctrine\Common\Persistence\Mapping\ClassMetadata

loadMetadataForFields() публичный Метод

public loadMetadataForFields ( array $fields )
$fields array

loadMetadataForTable() защищенный Метод

Load the metadata for a table.
protected loadMetadataForTable ( Doctrine\DBAL\Schema\Table $table )
$table Doctrine\DBAL\Schema\Table

normalizeClassName() защищенный Метод

Performs basic normalisation on a searched for class name to make sure it conforms to lookup format.
protected normalizeClassName ( $className ) : string
$className
Результат string

resolveClassName() публичный Метод

Method will try to find an entity class name to handle data, alternatively falling back to $this->fallbackEntity
public resolveClassName ( string $alias ) : string
$alias string
Результат string Fully Qualified Class Name

setContentFields() публичный Метод

public setContentFields ( $contentKey, $className, $table )

setDefaultAlias() публичный Метод

Adds an alias mapping from an internal name to a Fully Qualified Entity.
public setDefaultAlias ( string $alias, string $entity ) : void
$alias string
$entity string
Результат void

setIncomingRelations() публичный Метод

public setIncomingRelations ( $contentKey, $className )
$contentKey
$className

setRelations() публичный Метод

Set the relationship.
public setRelations ( string $contentKey, string $className, Doctrine\DBAL\Schema\Table $table )
$contentKey string
$className string
$table Doctrine\DBAL\Schema\Table

setRepeaters() публичный Метод

public setRepeaters ( string $contentKey, string $className, array $inputData = null ) : array | null
$contentKey string
$className string
$inputData array
Результат array | null

setTaxonomies() публичный Метод

Set the taxonomy.
public setTaxonomies ( string $contentKey, string $className, Doctrine\DBAL\Schema\Table $table )
$contentKey string
$className string
$table Doctrine\DBAL\Schema\Table

setTemplatefields() публичный Метод

Setup a templatefields field if needed.
public setTemplatefields ( string $contentKey, string $className, Doctrine\DBAL\Schema\Table $table )
$contentKey string
$className string
$table Doctrine\DBAL\Schema\Table

Описание свойств

$aliases защищенное свойство

protected array $aliases
Результат array

$contenttypes защищенное свойство

protected array $contenttypes
Результат array

$defaultAliases защищенное свойство

protected array $defaultAliases
Результат array

$fallbackEntity защищенное свойство

A default entity for any table not matched
protected $fallbackEntity

$initialized защищенное свойство

protected bool $initialized
Результат boolean

$metadata защищенное свойство

metadata mappings
protected $metadata

$namingStrategy защищенное свойство

protected NamingStrategy,Bolt\Storage $namingStrategy
Результат Bolt\Storage\NamingStrategy

$schemaManager защищенное свойство

protected Manager,Bolt\Storage\Database\Schema $schemaManager
Результат Bolt\Storage\Database\Schema\Manager

$taxonomies защищенное свойство

taxonomy configuration
protected $taxonomies

$typemap защищенное свойство

protected array $typemap
Результат array

$unmapped защищенное свойство

Keeps a reference of which metadata is not mapped to a specific entity.
protected array $unmapped
Результат array