class ClassMetadataFactory implements ClassMetadataFactory (View source)

Constants

ANNOTATION_PROPERTY_CLASS

ANNOTATION_CLASS_CLASS

Properties

protected $annotationReader
protected $cache
protected $documentDirectories
protected $metadata
protected $classMap
static $singleAssociations
static $multipleAssociations

Methods

__construct(ReaderInterface $annotationReader, Cache $cache)

No description

getAllMetadata()

No description

getMetadataFor($className)

No description

hasMetadataFor($className)

No description

boolean
isTransient(string $className)

Whether the class with the specified name should have its metadata loaded.

setMetadataFor($className, $metadata)

No description

array
getDocumentDirectories()

Returns the directories in which the mapper is going to look for classes mapped for the Doctrine\OrientDB ODM.

setDocumentDirectories(array $directories)

Sets the directories in which the mapper is going to look for classes mapped for the Doctrine\OrientDB ODM.

string
getClassByPath(string $file, string $namespace)

Returns the fully qualified name of a class by its path

getClassAnnotation(string $class)

Returns the annotation of a class.

getPropertyAnnotation(ReflectionProperty $property)

Returns the annotation of a property.

array
getObjectPropertyAnnotations(mixed $document)

Returns all the annotations in the $document's properties.

string
findClassMappingInDirectories(string $OClass)

Tries to find the PHP class mapping Doctrine\OrientDB's $OClass in each of the directories where the documents are stored.

populateMetadata(ClassMetadata $metadata)

No description

Array
getAssociationTypes()

Returns all the possible association types.

string|null
findClassMappingInDirectory(string $OClass, string $directory, string $namespace)

Searches a PHP class mapping Doctrine\OrientDB's $OClass in $directory, which uses the given $namespace.

Details

__construct(ReaderInterface $annotationReader, Cache $cache)

Parameters

ReaderInterface $annotationReader
Cache $cache

getAllMetadata()

ClassMetadata getMetadataFor($className)

Parameters

$className

Return Value

ClassMetadata

hasMetadataFor($className)

Parameters

$className

boolean isTransient(string $className)

Whether the class with the specified name should have its metadata loaded.

This is only the case if it is either mapped directly or as a MappedSuperclass.

Parameters

string $className

Return Value

boolean

setMetadataFor($className, $metadata)

Parameters

$className
$metadata

array getDocumentDirectories()

Returns the directories in which the mapper is going to look for classes mapped for the Doctrine\OrientDB ODM.

Return Value

array

setDocumentDirectories(array $directories)

Sets the directories in which the mapper is going to look for classes mapped for the Doctrine\OrientDB ODM.

Parameters

array $directories

string getClassByPath(string $file, string $namespace)

Returns the fully qualified name of a class by its path

Parameters

string $file
string $namespace

Return Value

string

Document getClassAnnotation(string $class)

Returns the annotation of a class.

Parameters

string $class

Return Value

Document

Property getPropertyAnnotation(ReflectionProperty $property)

Returns the annotation of a property.

Parameters

ReflectionProperty $property

Return Value

Property

array getObjectPropertyAnnotations(mixed $document)

Returns all the annotations in the $document's properties.

Parameters

mixed $document

Return Value

array

string findClassMappingInDirectories(string $OClass)

Tries to find the PHP class mapping Doctrine\OrientDB's $OClass in each of the directories where the documents are stored.

Parameters

string $OClass

Return Value

string

Exceptions

OClassNotFoundException

protected populateMetadata(ClassMetadata $metadata)

Parameters

ClassMetadata $metadata

protected Array getAssociationTypes()

Returns all the possible association types.

e.g. linklist, linkmap, link...

Return Value

Array

protected string|null findClassMappingInDirectory(string $OClass, string $directory, string $namespace)

Searches a PHP class mapping Doctrine\OrientDB's $OClass in $directory, which uses the given $namespace.

Parameters

string $OClass
string $directory
string $namespace

Return Value

string|null