Documentation

AbstractExporter
in package

AbstractYes

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

Tags
deprecated
2.7

This class is being removed from the ORM and won't have any replacement

link
www.doctrine-project.org

Table of Contents

Properties

$_extension  : string|null
$_metadata  : array<string|int, ClassMetadata>
$_outputDir  : string|null
$_overwriteExistingFiles  : bool

Methods

__construct()  : mixed
export()  : void
Exports each ClassMetadata instance to a single Doctrine Mapping file named after the entity.
exportClassMetadata()  : string
Converts a single ClassMetadata instance to the exported format and returns it.
getExtension()  : string|null
Gets the extension used to generated the path to a class.
setExtension()  : void
Sets the directory to output the mapping files to.
setMetadata()  : void
Sets the array of ClassMetadata instances to export.
setOutputDir()  : void
Sets the directory to output the mapping files to.
setOverwriteExistingFiles()  : void
_generateOutputPath()  : string
Generates the path to write the class for the given ClassMetadataInfo instance.
_getChangeTrackingPolicyString()  : string
_getFetchModeString()  : string
_getIdGeneratorTypeString()  : string
_getInheritanceTypeString()  : string

Properties

$_overwriteExistingFiles

protected bool $_overwriteExistingFiles = false

Methods

__construct()

public __construct([string|null $dir = null ]) : mixed
Parameters
$dir : string|null = null

export()

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

public export() : void
Tags
throws
ExportException

getExtension()

Gets the extension used to generated the path to a class.

public getExtension() : string|null
Return values
string|null

setExtension()

Sets the directory to output the mapping files to.

public setExtension(string $extension) : void

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

Parameters
$extension : string

setMetadata()

Sets the array of ClassMetadata instances to export.

public setMetadata(array<string|int, mixed> $metadata) : void
Parameters
$metadata : array<string|int, mixed>
Tags
psalm-param

list<ClassMetadata> $metadata

setOutputDir()

Sets the directory to output the mapping files to.

public setOutputDir(string $dir) : void

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

Parameters
$dir : string

setOverwriteExistingFiles()

public setOverwriteExistingFiles(bool $overwrite) : void
Parameters
$overwrite : bool

_getChangeTrackingPolicyString()

protected _getChangeTrackingPolicyString(int $policy) : string
Parameters
$policy : int
Tags
psalm-param

ClassMetadataInfo::CHANGETRACKING_* $policy

Return values
string

_getFetchModeString()

protected _getFetchModeString(int $mode) : string
Parameters
$mode : int
Tags
psalm-param

ClassMetadataInfo::FETCH_* $mode

Return values
string

_getIdGeneratorTypeString()

protected _getIdGeneratorTypeString(int $type) : string
Parameters
$type : int
Tags
psalm-param

ClassMetadataInfo::GENERATOR_TYPE_* $type

Return values
string

_getInheritanceTypeString()

protected _getInheritanceTypeString(int $type) : string
Parameters
$type : int
Tags
psalm-param

ClassMetadataInfo::INHERITANCE_TYPE_* $type

Return values
string

        
On this page

Search results