Doctrine


Doctrine\ORM\Mapping\Driver\AbstractFileDriver
/Doctrine/ORM/Mapping/Driver/AbstractFileDriver.php at line 43

Class AbstractFileDriver

AbstractFileDriver
All Implemented Interfaces:
Driver

public abstract class AbstractFileDriver

Base driver for file-based metadata drivers.

A file driver operates in a mode where it loads the mapping files of individual classes on demand. This requires the user to adhere to the convention of 1 mapping file per class and the file names of the mapping files must correspond to the full class name, including namespace, with the namespace delimiters '\', replaced by dots '.'.

License:
http://www.opensource.org/licenses/lgpl-license.php LGPL
See Also:
www.doctrine-project.com
Since:
2.0
Version:
$Revision$
Author Benjamin:
Eberlei
Author Guilherme:
Blanco
Author:
Jonathan H. Wage
Roman Borschel

Field Summary
protected string

$_fileExtension

The file extension of mapping documents.

protected array

$_paths

The paths where to look for mapping files.

Constructor Summary

AbstractFileDriver(string|array paths)

Initializes a new FileDriver that looks in the given path(s) for mapping documents and operates in the specified operating mode.

Method Summary
void

addPaths(array paths)

Append lookup paths to metadata driver.

array

getAllClassNames()

Gets the names of all mapped classes known to this driver.

array

getElement(mixed className)

Get the element of schema meta data for the class from the mapping file.

void

getFileExtension()

Get the file extension used to look for mapping files under

array

getPaths()

Retrieve the defined metadata lookup paths.

boolean

isTransient(string className)

Whether the class with the specified name should have its metadata loaded.

void

setFileExtension(string fileExtension)

Set the file extension used to look for mapping files under

Field Detail

/Doctrine/ORM/Mapping/Driver/AbstractFileDriver.php at line 57

_fileExtension

protected string $_fileExtension

The file extension of mapping documents.


/Doctrine/ORM/Mapping/Driver/AbstractFileDriver.php at line 50

_paths

protected array $_paths = array()

The paths where to look for mapping files.


Constructor Detail

/Doctrine/ORM/Mapping/Driver/AbstractFileDriver.php at line 65

AbstractFileDriver

public AbstractFileDriver(string|array paths)

Initializes a new FileDriver that looks in the given path(s) for mapping documents and operates in the specified operating mode.

Parameters:
paths - One or multiple paths where mapping documents can be found.

Method Detail

/Doctrine/ORM/Mapping/Driver/AbstractFileDriver.php at line 75

addPaths

public void addPaths(array paths)

Append lookup paths to metadata driver.


/Doctrine/ORM/Mapping/Driver/AbstractFileDriver.php at line 151

getAllClassNames

public array getAllClassNames()

Gets the names of all mapped classes known to this driver.

Returns:
The names of all mapped classes known to this driver.

/Doctrine/ORM/Mapping/Driver/AbstractFileDriver.php at line 117

getElement

public array getElement(mixed className)

Get the element of schema meta data for the class from the mapping file. This will lazily load the mapping file if it is not loaded yet

Returns:
$element The element of schema meta data

/Doctrine/ORM/Mapping/Driver/AbstractFileDriver.php at line 95

getFileExtension

public void getFileExtension()

Get the file extension used to look for mapping files under


/Doctrine/ORM/Mapping/Driver/AbstractFileDriver.php at line 85

getPaths

public array getPaths()

Retrieve the defined metadata lookup paths.


/Doctrine/ORM/Mapping/Driver/AbstractFileDriver.php at line 132

isTransient

public boolean isTransient(string className)

Whether the class with the specified name should have its metadata loaded. This is only the case if it is either mapped as an Entity or a MappedSuperclass.


/Doctrine/ORM/Mapping/Driver/AbstractFileDriver.php at line 106

setFileExtension

public void setFileExtension(string fileExtension)

Set the file extension used to look for mapping files under

Parameters:
fileExtension - The file extension to set

Doctrine