Doctrine


Doctrine\ORM\Mapping\ClassMetadataFactory
/Doctrine/ORM/Mapping/ClassMetadataFactory.php at line 42

Class ClassMetadataFactory

ClassMetadataFactory

public class ClassMetadataFactory

The ClassMetadataFactory is used to create ClassMetadata objects that contain all the metadata mapping informations of a class which describes how a class should be mapped to a relational database.

License:
http://www.opensource.org/licenses/lgpl-license.php LGPL
See Also:
www.doctrine-project.org
Since:
2.0
Version:
$Revision$
Author:
Benjamin Eberlei
Guilherme Blanco
Jonathan Wage
Roman Borschel

Constructor Summary

ClassMetadataFactory(mixed em, $driver The)

Creates a new factory instance that uses the given metadata driver implementation.

Method Summary
array

getAllMetadata()

Forces the factory to load the metadata of all classes known to the underlying mapping driver.

Doctrine\Common\Cache\Cache

getCacheDriver()

Gets the cache driver used by the factory to cache ClassMetadata instances.

void

getLoadedMetadata()

Doctrine\ORM\Mapping\ClassMetadata

getMetadataFor(string className)

Gets the class metadata descriptor for a class.

boolean

hasMetadataFor(string className)

Checks whether the factory has the metadata for a class loaded already.

void

setCacheDriver(Doctrine\Common\Cache\Cache cacheDriver)

Sets the cache driver used by the factory to cache ClassMetadata instances.

void

setMetadataFor(string className, ClassMetadata class)

Sets the metadata descriptor for a specific class.

Constructor Detail

/Doctrine/ORM/Mapping/ClassMetadataFactory.php at line 61

ClassMetadataFactory

public ClassMetadataFactory(mixed em, $driver The)

Creates a new factory instance that uses the given metadata driver implementation.

Parameters:
The - metadata driver to use.

Method Detail

/Doctrine/ORM/Mapping/ClassMetadataFactory.php at line 97

getAllMetadata

public array getAllMetadata()

Forces the factory to load the metadata of all classes known to the underlying mapping driver.

Returns:
The ClassMetadata instances of all mapped classes.

/Doctrine/ORM/Mapping/ClassMetadataFactory.php at line 81

getCacheDriver

public Doctrine\Common\Cache\Cache getCacheDriver()

Gets the cache driver used by the factory to cache ClassMetadata instances.


/Doctrine/ORM/Mapping/ClassMetadataFactory.php at line 86

getLoadedMetadata

public void getLoadedMetadata()

/Doctrine/ORM/Mapping/ClassMetadataFactory.php at line 129

getMetadataFor

public Doctrine\ORM\Mapping\ClassMetadata getMetadataFor(string className)

Gets the class metadata descriptor for a class.

Parameters:
className - The name of the class.

/Doctrine/ORM/Mapping/ClassMetadataFactory.php at line 176

hasMetadataFor

public boolean hasMetadataFor(string className)

Checks whether the factory has the metadata for a class loaded already.

Returns:
TRUE if the metadata of the class in question is already loaded, FALSE otherwise.

/Doctrine/ORM/Mapping/ClassMetadataFactory.php at line 71

setCacheDriver

public void setCacheDriver(Doctrine\Common\Cache\Cache cacheDriver)

Sets the cache driver used by the factory to cache ClassMetadata instances.


/Doctrine/ORM/Mapping/ClassMetadataFactory.php at line 189

setMetadataFor

public void setMetadataFor(string className, ClassMetadata class)

Sets the metadata descriptor for a specific class.

NOTE: This is only useful in very special cases, like when generating proxy classes.


Doctrine