Doctrine


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

Class AnnotationDriver

AnnotationDriver
All Implemented Interfaces:
Driver

public class AnnotationDriver

The AnnotationDriver reads the mapping metadata from docblock annotations.

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

Field Summary
protected mixed

$_classNames

protected string

$_fileExtension

The file extension of mapping documents.

protected array

$_paths

The paths where to look for mapping files.

Constructor Summary

AnnotationDriver(mixed reader, string|array paths, $reader The)

Initializes a new AnnotationDriver that uses the given AnnotationReader for reading docblock annotations.

Method Summary
void

addPaths(array paths)

Append lookup paths to metadata driver.

static AnnotationDriver

create(array|string paths, AnnotationReader reader)

Factory method for the Annotation Driver

void

getAllClassNames()

{@inheritDoc}

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 is transient.

void

loadMetadataForClass(mixed className, mixed metadata)

{@inheritdoc}

void

setFileExtension(string fileExtension)

Set the file extension used to look for mapping files under

Field Detail

/Doctrine/ORM/Mapping/Driver/AnnotationDriver.php at line 69

_classNames

protected mixed $_classNames


/Doctrine/ORM/Mapping/Driver/AnnotationDriver.php at line 64

_fileExtension

protected string $_fileExtension = '.php'

The file extension of mapping documents.


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

_paths

protected array $_paths = array()

The paths where to look for mapping files.


Constructor Detail

/Doctrine/ORM/Mapping/Driver/AnnotationDriver.php at line 78

AnnotationDriver

public AnnotationDriver(mixed reader, string|array paths, $reader The)

Initializes a new AnnotationDriver that uses the given AnnotationReader for reading docblock annotations.

Parameters:
The - AnnotationReader to use.
paths - One or multiple paths where mapping classes can be found.

Method Detail

/Doctrine/ORM/Mapping/Driver/AnnotationDriver.php at line 91

addPaths

public void addPaths(array paths)

Append lookup paths to metadata driver.


/Doctrine/ORM/Mapping/Driver/AnnotationDriver.php at line 481

create

public static AnnotationDriver create(array|string paths, AnnotationReader reader)

Factory method for the Annotation Driver


/Doctrine/ORM/Mapping/Driver/AnnotationDriver.php at line 425

getAllClassNames

public void getAllClassNames()


/Doctrine/ORM/Mapping/Driver/AnnotationDriver.php at line 111

getFileExtension

public void getFileExtension()

Get the file extension used to look for mapping files under


/Doctrine/ORM/Mapping/Driver/AnnotationDriver.php at line 101

getPaths

public array getPaths()

Retrieve the defined metadata lookup paths.


/Doctrine/ORM/Mapping/Driver/AnnotationDriver.php at line 414

isTransient

public boolean isTransient(string className)

Whether the class with the specified name is transient. Only non-transient classes, that is entities and mapped superclasses, should have their metadata loaded. A class is non-transient if it is annotated with either @Entity or

MappedSuperclass:
in the class doc block.

/Doctrine/ORM/Mapping/Driver/AnnotationDriver.php at line 130

loadMetadataForClass

public void loadMetadataForClass(mixed className, mixed metadata)


/Doctrine/ORM/Mapping/Driver/AnnotationDriver.php at line 122

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