PHP Class Doctrine\ODM\OrientDB\Mapper\ClassMetadata

Inheritance: implements Doctrine\Common\Persistence\Mapping\ClassMetadata
Show file Open project: doctrine/orientdb-odm Class Usage Examples

Protected Properties

Property Type Description
$associations
$class
$fields
$identifierPropertyName
$refClass
$reflFields

Public Methods

Method Description
__construct ( string $className ) Instantiates a new Metadata for the given $className.
getAssociationMappedByTargetField ( string $assocName ) : string
getAssociationNames ( ) : Array A numerically indexed list of association names of this persistent class.
getAssociationTargetClass ( string $assocName ) : string Returns the target class name of the given association.
getFieldNames ( ) : Array A numerically indexed list of field names of this persistent class.
getIdentifier ( ) : array Gets the mapped identifier field name.
getIdentifierFieldNames ( ) : array
getIdentifierValues ( object $object ) : array
getName ( ) : string Get fully-qualified class name of this persistent class.
getReflectionClass ( ) : ReflectionClass Gets the ReflectionClass instance for this mapped class.
getReflectionFields ( )
getReflectionProperties ( )
getRidPropertyName ( ) : string PHP 5.3, no array dereferencing.
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 $property ) : boolean Checks if the given field is a mapped property for this class.
isAssociationInverseSide ( string $assocName ) : boolean
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.
setAssociations ( array $associations )
setDocumentValue ( mixed $document, string $property, string $value ) Given a $property and its $value, sets that property on the given $document by using a closures if available, otherwise fall back to reflection.
setFields ( array $fields )
setIdentifier ( $property )

Protected Methods

Method Description
discoverReflectionFields ( )
getAssociation ( string $field ) : string Returns the association mapped for the given $field.
getAssociations ( ) : Array Returns all the possible associations mapped in the introspected class.
getField ( string $field ) : Property Returns the reflection property associated with the $field.
getFieldByProperty ( $property ) : Property Returns the reflection property associated with the $property.
getFields ( ) : Array Returns all the fields of the introspected class.
isValuedAssociation ( string $field, array $associationTypes ) : boolean Checks whether the $field is mapped as an association.

Method Details

__construct() public method

Instantiates a new Metadata for the given $className.
public __construct ( string $className )
$className string

discoverReflectionFields() protected method

protected discoverReflectionFields ( )

getAssociation() protected method

Returns the association mapped for the given $field.
protected getAssociation ( string $field ) : string
$field string
return string

getAssociationMappedByTargetField() public method

public getAssociationMappedByTargetField ( string $assocName ) : string
$assocName string
return string

getAssociationNames() public method

This array includes identifier associations if present on this class.
public getAssociationNames ( ) : Array
return Array

getAssociationTargetClass() public method

Returns the target class name of the given association.
public getAssociationTargetClass ( string $assocName ) : string
$assocName string
return string

getAssociations() protected method

Returns all the possible associations mapped in the introspected class.
protected getAssociations ( ) : Array
return Array

getField() protected method

Returns the reflection property associated with the $field.
protected getField ( string $field ) : Property
$field string
return Doctrine\ODM\OrientDB\Mapper\Annotations\Property

getFieldByProperty() protected method

Returns the reflection property associated with the $property.
protected getFieldByProperty ( $property ) : Property
return Doctrine\ODM\OrientDB\Mapper\Annotations\Property

getFieldNames() public method

This array includes identifier fields if present on this class.
public getFieldNames ( ) : Array
return Array

getFields() protected method

Returns all the fields of the introspected class.
protected getFields ( ) : Array
return Array

getIdentifier() public method

The returned structure is an array of the identifier field names.
public getIdentifier ( ) : array
return array

getIdentifierFieldNames() public method

public getIdentifierFieldNames ( ) : array
return array

getIdentifierValues() public method

public getIdentifierValues ( object $object ) : array
$object object
return array

getName() public method

Get fully-qualified class name of this persistent class.
public getName ( ) : string
return string

getReflectionClass() public method

Gets the ReflectionClass instance for this mapped class.
public getReflectionClass ( ) : ReflectionClass
return ReflectionClass

getReflectionFields() public method

public getReflectionFields ( )

getReflectionProperties() public method

getRidPropertyName() public method

.
public getRidPropertyName ( ) : string
return string

getTypeOfField() public method

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
return string

hasAssociation() public method

Checks if the given field is a mapped association for this class.
public hasAssociation ( string $fieldName ) : boolean
$fieldName string
return boolean

hasField() public method

Checks if the given field is a mapped property for this class.
public hasField ( string $property ) : boolean
$property string The name of the property to which the field is mapped
return boolean

isAssociationInverseSide() public method

public isAssociationInverseSide ( string $assocName ) : boolean
$assocName string
return boolean

isCollectionValuedAssociation() public method

Checks if the given field is a mapped collection valued association for this class.
public isCollectionValuedAssociation ( string $fieldName ) : boolean
$fieldName string
return boolean

isIdentifier() public method

Checks if the given field name is a mapped identifier for this class.
public isIdentifier ( string $fieldName ) : boolean
$fieldName string
return boolean

isSingleValuedAssociation() public method

Checks if the given field is a mapped single valued association for this class.
public isSingleValuedAssociation ( string $fieldName ) : boolean
$fieldName string
return boolean

isValuedAssociation() protected method

Checks whether the $field is mapped as an association.
protected isValuedAssociation ( string $field, array $associationTypes ) : boolean
$field string
$associationTypes array
return boolean

setAssociations() public method

public setAssociations ( array $associations )
$associations array

setDocumentValue() public method

Given a $property and its $value, sets that property on the given $document by using a closures if available, otherwise fall back to reflection.
public setDocumentValue ( mixed $document, string $property, string $value )
$document mixed
$property string
$value string

setFields() public method

public setFields ( array $fields )
$fields array

setIdentifier() public method

public setIdentifier ( $property )

Property Details

$associations protected property

protected $associations

$class protected property

protected $class

$fields protected property

protected $fields

$identifierPropertyName protected property

protected $identifierPropertyName

$refClass protected property

protected $refClass

$reflFields protected property

protected $reflFields