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
파일 보기 프로젝트 열기: doctrine/search 1 사용 예제들

공개 프로퍼티들

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