PHP 클래스 Bolt\Storage\Mapping\MetadataDriver

저자: Ross Riley ([email protected])
상속: implements Doctrine\Common\Persistence\Mapping\Driver\MappingDriver
파일 보기 프로젝트 열기: bolt/bolt 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$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