Doctrine


Doctrine\ORM\Tools\Export\Driver\AbstractExporter
/Doctrine/ORM/Tools/Export/Driver/AbstractExporter.php at line 37

Class AbstractExporter

AbstractExporter

public abstract class AbstractExporter

Abstract base class which is to be used for the Exporter drivers which can be found in Doctrine\ORM\Tools\Export\Driver

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

Field Summary
protected mixed

$_extension

protected mixed

$_metadatas

protected mixed

$_outputDir

Constructor Summary

AbstractExporter(mixed dir)

Method Summary
void

export()

Export each ClassMetadata instance to a single Doctrine Mapping file named after the entity

abstract mixed

exportClassMetadata(ClassMetadataInfo metadata)

Converts a single ClassMetadata instance to the exported format and returns it

string

getExtension()

Get the extension used to generated the path to a class

void

setExtension(string extension)

Set the directory to output the mapping files to[php] $exporter = new YamlExporter($metadatas, __DIR__ .

void

setMetadatas(array metadatas)

Set the array of ClassMetadataInfo instances to export

void

setOutputDir(string dir)

Set the directory to output the mapping files to[php] $exporter = new YamlExporter($metadatas); $exporter->setOutputDir(__DIR__ .

Field Detail

/Doctrine/ORM/Tools/Export/Driver/AbstractExporter.php at line 41

_extension

protected mixed $_extension

/Doctrine/ORM/Tools/Export/Driver/AbstractExporter.php at line 39

_metadatas

protected mixed $_metadatas = array()

/Doctrine/ORM/Tools/Export/Driver/AbstractExporter.php at line 40

_outputDir

protected mixed $_outputDir

Constructor Detail

/Doctrine/ORM/Tools/Export/Driver/AbstractExporter.php at line 43

AbstractExporter

public AbstractExporter(mixed dir)

Method Detail

/Doctrine/ORM/Tools/Export/Driver/AbstractExporter.php at line 100

export

public void export()

Export each ClassMetadata instance to a single Doctrine Mapping file named after the entity


/Doctrine/ORM/Tools/Export/Driver/AbstractExporter.php at line 55

exportClassMetadata

public abstract mixed exportClassMetadata(ClassMetadataInfo metadata)

Converts a single ClassMetadata instance to the exported format and returns it

Returns:
$exported

/Doctrine/ORM/Tools/Export/Driver/AbstractExporter.php at line 73

getExtension

public string getExtension()

Get the extension used to generated the path to a class

Returns:
$extension

/Doctrine/ORM/Tools/Export/Driver/AbstractExporter.php at line 139

setExtension

public void setExtension(string extension)

Set the directory to output the mapping files to

[php] $exporter = new YamlExporter($metadatas, __DIR__ . '/yaml'); $exporter->setExtension('.yml'); $exporter->export();


/Doctrine/ORM/Tools/Export/Driver/AbstractExporter.php at line 63

setMetadatas

public void setMetadatas(array metadatas)

Set the array of ClassMetadataInfo instances to export


/Doctrine/ORM/Tools/Export/Driver/AbstractExporter.php at line 89

setOutputDir

public void setOutputDir(string dir)

Set the directory to output the mapping files to

[php] $exporter = new YamlExporter($metadatas); $exporter->setOutputDir(__DIR__ . '/yaml'); $exporter->export();


Doctrine