PHP Class Doctrine\OXM\Mapping\Driver\AbstractFileDriver

Since: 2.0
Author: Richard Fullmer ([email protected])
Inheritance: implements Doctrine\OXM\Mapping\Driver\Driver
Datei anzeigen Open project: doctrine/oxm

Protected Properties

Property Type Description
$fileExtension string The file extension of mapping documents.
$paths array The paths where to look for mapping files.

Public Methods

Method Description
__construct ( string | array $paths ) Initializes a new FileDriver that looks in the given path(s) for mapping documents and operates in the specified operating mode.
addPaths ( array $paths ) Append lookup paths to metadata driver.
getAllClassNames ( ) : array Gets the names of all mapped classes known to this driver.
getElement ( $className ) : array Get the element of schema meta data for the class from the mapping file.
getFileExtension ( ) : void Get the file extension used to look for mapping files under
getPaths ( ) : array Retrieve the defined metadata lookup paths.
isTransient ( string $className ) : boolean Whether the class with the specified name should have its metadata loaded.
setFileExtension ( string $fileExtension ) : void Set the file extension used to look for mapping files under

Protected Methods

Method Description
findMappingFile ( $className ) : string Finds the mapping file for the class with the given name by searching through the configured paths.
loadMappingFile ( string $file ) : array Loads a mapping file with the given name and returns a map from class/entity names to their corresponding elements.

Method Details

__construct() public method

Initializes a new FileDriver that looks in the given path(s) for mapping documents and operates in the specified operating mode.
public __construct ( string | array $paths )
$paths string | array One or multiple paths where mapping documents can be found.

addPaths() public method

Append lookup paths to metadata driver.
public addPaths ( array $paths )
$paths array

findMappingFile() protected method

Finds the mapping file for the class with the given name by searching through the configured paths.
protected findMappingFile ( $className ) : string
$className
return string The (absolute) file name.

getAllClassNames() public method

Gets the names of all mapped classes known to this driver.
public getAllClassNames ( ) : array
return array The names of all mapped classes known to this driver.

getElement() public method

This will lazily load the mapping file if it is not loaded yet
public getElement ( $className ) : array
return array $element The element of schema meta data

getFileExtension() public method

Get the file extension used to look for mapping files under
public getFileExtension ( ) : void
return void

getPaths() public method

Retrieve the defined metadata lookup paths.
public getPaths ( ) : array
return array

isTransient() public method

This is only the case if it is either mapped as an Entity or a MappedSuperclass.
public isTransient ( string $className ) : boolean
$className string
return boolean

loadMappingFile() abstract protected method

Loads a mapping file with the given name and returns a map from class/entity names to their corresponding elements.
abstract protected loadMappingFile ( string $file ) : array
$file string The mapping file to load.
return array

setFileExtension() public method

Set the file extension used to look for mapping files under
public setFileExtension ( string $fileExtension ) : void
$fileExtension string The file extension to set
return void

Property Details

$fileExtension protected_oe property

The file extension of mapping documents.
protected string $fileExtension
return string

$paths protected_oe property

The paths where to look for mapping files.
protected array $paths
return array