ClassMetadataExporter
public class ClassMetadataExporter
www.doctrine-project.org
Constructor Summary | |
---|---|
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[php] $cme = new Doctrine\ORM\Tools\Export\ClassMetadataExporter(); $cme->addMappingSource(__DIR__ . |
AbstractExporter | getExporter(string type, string source) Get a exporter driver instance |
array | Get an array of ClassMetadataInfo instances for all the configured mapping directories. |
static void | registerExportDriver(string name, string class) Register a new exporter 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 ClassMetadataExporter()
public void addMappingSource(string source, string type)
Add a new mapping directory to the array of directories to convert and export to another format
[php] $cme = new Doctrine\ORM\Tools\Export\ClassMetadataExporter(); $cme->addMappingSource(__DIR__ . '/yaml'); $cme->addMappingSource($schemaManager);
public AbstractExporter getExporter(string type, string source)
Get a exporter driver instance
public array getMetadatas()
Get an array of ClassMetadataInfo instances for all the configured mapping directories. Reads the mapping directories and populates ClassMetadataInfo instances.
public static void registerExportDriver(string name, string class)
Register a new exporter 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 used for converting your mapping information between the supported formats: yaml, xml, and php/annotation.
[php] Unify all your mapping information which is written in php, xml, yml and convert it to a single set of yaml files.
$cme = new Doctrine\ORM\Tools\Export\ClassMetadataExporter(); $cme->addMappingSource(__DIR__ . '/Entities'); $cme->addMappingSource(__DIR__ . '/xml'); $cme->addMappingSource(__DIR__ . '/yaml');
$exporter = $cme->getExporter('yaml'); $exporter->setOutputDir(__DIR__ . '/new_yaml');
$exporter->setMetadatas($cme->getMetadatas()); $exporter->export();