ClassMetadataReader
public class ClassMetadataReader
www.doctrine-project.org
Method Summary | |
---|---|
void | addMappingSource(string source, string type) Add a new mapping directory to the array of directories to convert and export to another format |
array | getMetadatas(bool autoload) Get an array of ClassMetadataInfo instances for all the configured mapping directories. |
static void | registerMappingDriver(string name, string class) Register a new mapping driver class under a specified name |
void | setEntityManager(EntityManager em) Optionally set the EntityManager instance to get the AnnotationDriver from instead of creating a new instance of the AnnotationDriver |
public void addMappingSource(string source, string type)
Add a new mapping directory to the array of directories to convert and export to another format
public array getMetadatas(bool autoload)
Get an array of ClassMetadataInfo instances for all the configured mapping directories. Reads the mapping directories and populates ClassMetadataInfo instances.
If you specify $autoload = true then this method will return ClassMetadata instances instead of ClassMetadataInfo instances. Keep in mind that if you specify it to autoload and it doesn't find the class your autoloader may throw an error.
public static void registerMappingDriver(string name, string class)
Register a new mapping driver class under a specified name
public void setEntityManager(EntityManager em)
Optionally set the EntityManager instance to get the AnnotationDriver from instead of creating a new instance of the AnnotationDriver
Class to read metadata mapping information from multiple sources into an array of ClassMetadataInfo instances.
The difference between this class and the ClassMetadataFactory is that this is just a tool for reading in the mapping information from files without having it bound to the actual ORM and the mapping information referenced by the EntityManager. This allows us to read any source of mapping information and return a single array of aggregated ClassMetadataInfo instances.
These arrays are used for exporting the mapping information to the supported mapping drivers, generating entities, generating repositories, etc.