PHP Класс Doctrine\Search\Mapping\ClassMetadata

Once populated, ClassMetadata instances are usually cached in a serialized form. IMPORTANT NOTE: The fields of this class are only public for 2 reasons: 1) To allow fast READ access. 2) To drastically reduce the size of a serialized instance (public/protected members get the whole class name, namespace inclusive, prepended to every property in the serialized representation).
С версии: 1.0
Автор: Mike Lohmann ([email protected])
Наследование: implements Doctrine\Common\Persistence\Mapping\ClassMetadata
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$boost float
$className string
$fieldMappings array | Doctrine\Search\Mapping\Annotations\ElasticField[] The ReflectionProperty instances of the mapped class.
$identifier string The field name of the identifier
$index string
$numberOfReplicas integer
$numberOfShards integer
$parameters array The ReflectionProperty parameters of the mapped class.
$parent string
$reflClass ReflectionClass The ReflectionClass instance of the mapped class.
$reflFields ReflectionClass The ReflectionClass instance of the mapped class.
$rootMappings array | Doctrine\Search\Mapping\Annotations\ElasticRoot[] Additional root annotations of the mapped class.
$source boolean
$timeToLive integer
$type string
$value integer

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

Метод Описание
__construct ( $documentName )
__sleep ( ) : array Determines which fields get serialized.
getAssociationMappedByTargetField ( $assocName )
getAssociationNames ( ) : array Currently not necessary but needed by Interface
getAssociationTargetClass ( string $assocName ) : string Currently not necessary but needed by Interface
getFieldNames ( ) : array A numerically indexed list of field names of this persistent class.
getIdentifier ( ) : array Gets the mapped identifier field name.
getIdentifierFieldNames ( ) : array Returns an array of identifier field names numerically indexed.
getIdentifierValues ( object $object ) : array Return the identifier of this object as an array with field name as key.
getName ( ) : string Get fully-qualified class name of this persistent class.
getReflectionClass ( ) : ReflectionClass Gets the ReflectionClass instance for this mapped class.
getTypeOfField ( string $fieldName ) : string Returns a type name of this field.
hasAssociation ( string $fieldName ) : boolean Checks if the given field is a mapped association for this class.
hasField ( string $fieldName ) : boolean Checks if the given field is a mapped property for this class.
initializeReflection ( Doctrine\Common\Persistence\Mapping\ReflectionService $reflService ) : void Initializes a new ClassMetadata instance that will hold the object-relational mapping metadata of the class with the given name.
isAssociationInverseSide ( $assocName )
isCollectionValuedAssociation ( string $fieldName ) : boolean Checks if the given field is a mapped collection valued association for this class.
isIdentifier ( string $fieldName ) : boolean Checks if the given field name is a mapped identifier for this class.
isSingleValuedAssociation ( string $fieldName ) : boolean Checks if the given field is a mapped single valued association for this class.
mapField ( array $mapping ) : void Adds a mapped field to the class.
mapParameter ( array $mapping ) : void Adds a mapped parameter to the class.
mapRoot ( array $mapping = [] ) Adds a root mapping to the class.
setIdentifier ( mixed $identifier ) INTERNAL: Sets the mapped identifier key field of this class.
wakeupReflection ( Doctrine\Common\Persistence\Mapping\ReflectionService $reflService ) : void Restores some state that can not be serialized/unserialized.

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

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

public __construct ( $documentName )

__sleep() публичный метод

It is only serialized what is necessary for best unserialization performance. Parts that are also NOT serialized because they can not be properly unserialized: - reflClass (ReflectionClass) - reflFields (ReflectionProperty array)
public __sleep ( ) : array
Результат array The names of all the fields that should be serialized.

getAssociationMappedByTargetField() публичный метод

public getAssociationMappedByTargetField ( $assocName )

getAssociationNames() публичный метод

Currently not necessary but needed by Interface
public getAssociationNames ( ) : array
Результат array

getAssociationTargetClass() публичный метод

Currently not necessary but needed by Interface
public getAssociationTargetClass ( string $assocName ) : string
$assocName string
Результат string

getFieldNames() публичный метод

This array includes identifier fields if present on this class.
public getFieldNames ( ) : array
Результат array

getIdentifier() публичный метод

The returned structure is an array of the identifier field names.
public getIdentifier ( ) : array
Результат array

getIdentifierFieldNames() публичный метод

Returns an array of identifier field names numerically indexed.
public getIdentifierFieldNames ( ) : array
Результат array

getIdentifierValues() публичный метод

Has to return an empty array if no identifier isset.
public getIdentifierValues ( object $object ) : array
$object object
Результат array

getName() публичный метод

Get fully-qualified class name of this persistent class.
public getName ( ) : string
Результат string

getReflectionClass() публичный метод

Gets the ReflectionClass instance for this mapped class.
public getReflectionClass ( ) : ReflectionClass
Результат ReflectionClass

getTypeOfField() публичный метод

This type names can be implementation specific but should at least include the php types: integer, string, boolean, float/double, datetime.
public getTypeOfField ( string $fieldName ) : string
$fieldName string
Результат string

hasAssociation() публичный метод

Checks if the given field is a mapped association for this class.
public hasAssociation ( string $fieldName ) : boolean
$fieldName string
Результат boolean

hasField() публичный метод

Checks if the given field is a mapped property for this class.
public hasField ( string $fieldName ) : boolean
$fieldName string
Результат boolean

initializeReflection() публичный метод

Initializes a new ClassMetadata instance that will hold the object-relational mapping metadata of the class with the given name.
public initializeReflection ( Doctrine\Common\Persistence\Mapping\ReflectionService $reflService ) : void
$reflService Doctrine\Common\Persistence\Mapping\ReflectionService The reflection service.
Результат void

isAssociationInverseSide() публичный метод

public isAssociationInverseSide ( $assocName )

isCollectionValuedAssociation() публичный метод

Checks if the given field is a mapped collection valued association for this class.
public isCollectionValuedAssociation ( string $fieldName ) : boolean
$fieldName string
Результат boolean

isIdentifier() публичный метод

Checks if the given field name is a mapped identifier for this class.
public isIdentifier ( string $fieldName ) : boolean
$fieldName string
Результат boolean

isSingleValuedAssociation() публичный метод

Checks if the given field is a mapped single valued association for this class.
public isSingleValuedAssociation ( string $fieldName ) : boolean
$fieldName string
Результат boolean

mapField() публичный метод

Adds a mapped field to the class.
public mapField ( array $mapping ) : void
$mapping array The field mapping.
Результат void

mapParameter() публичный метод

Adds a mapped parameter to the class.
public mapParameter ( array $mapping ) : void
$mapping array The parameter mapping.
Результат void

mapRoot() публичный метод

Adds a root mapping to the class.
public mapRoot ( array $mapping = [] )
$mapping array

setIdentifier() публичный метод

Mainly used by the ClassMetadataFactory to assign inherited identifiers.
public setIdentifier ( mixed $identifier )
$identifier mixed

wakeupReflection() публичный метод

Restores some state that can not be serialized/unserialized.
public wakeupReflection ( Doctrine\Common\Persistence\Mapping\ReflectionService $reflService ) : void
$reflService Doctrine\Common\Persistence\Mapping\ReflectionService
Результат void

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

$boost публичное свойство

public float $boost
Результат float

$className публичное свойство

public string $className
Результат string

$fieldMappings публичное свойство

The ReflectionProperty instances of the mapped class.
public array|ElasticField[],Doctrine\Search\Mapping\Annotations $fieldMappings
Результат array | Doctrine\Search\Mapping\Annotations\ElasticField[]

$identifier публичное свойство

The field name of the identifier
public string $identifier
Результат string

$index публичное свойство

public string $index
Результат string

$numberOfReplicas публичное свойство

public int $numberOfReplicas
Результат integer

$numberOfShards публичное свойство

public int $numberOfShards
Результат integer

$parameters публичное свойство

The ReflectionProperty parameters of the mapped class.
public array $parameters
Результат array

$parent публичное свойство

public string $parent
Результат string

$reflClass публичное свойство

The ReflectionClass instance of the mapped class.
public ReflectionClass $reflClass
Результат ReflectionClass

$reflFields публичное свойство

The ReflectionClass instance of the mapped class.
public ReflectionClass $reflFields
Результат ReflectionClass

$rootMappings публичное свойство

Additional root annotations of the mapped class.
public array|ElasticRoot[],Doctrine\Search\Mapping\Annotations $rootMappings
Результат array | Doctrine\Search\Mapping\Annotations\ElasticRoot[]

$source публичное свойство

public bool $source
Результат boolean

$timeToLive публичное свойство

public int $timeToLive
Результат integer

$type публичное свойство

public string $type
Результат string

$value публичное свойство

public int $value
Результат integer