Doctrine\Common\Persistence\Mapping\Driver\FileDriver
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 '.'.
- Author: Benjamin Eberlei <kontakt@beberlei.de>
- License: http://www.opensource.org/licenses/lgpl-license.php LGPL
Synopsis
class FileDriver
implements
MappingDriver
{
- // members
- protected FileLocator $locator;
- protected array $classCache;
- protected string $globalBasename;
- // methods
- public void __construct()
- public void setGlobalBasename()
- public string getGlobalBasename()
- public array getElement()
- public boolean isTransient()
- public array getAllClassNames()
- protected abstract array loadMappingFile()
- protected void initialize()
- public FileLocator getLocator()
- public void setLocator()
Hierarchy
Extended by
- Doctrine\Common\Persistence\Mapping\Driver\PHPDriver
- Doctrine\ORM\Mapping\Driver\PHPDriver
- Doctrine\ORM\Mapping\Driver\YamlDriver
- Doctrine\ORM\Mapping\Driver\SimplifiedYamlDriver
- Doctrine\ORM\Mapping\Driver\SimplifiedXmlDriver
- Doctrine\ORM\Mapping\Driver\XmlDriver
Implements
Members
protected
- $classCache — array
- $globalBasename — string
- $locator — Doctrine\Common\Persistence\Mapping\Driver\FileLocator
Methods
protected
- initialize() — Initialize the class cache from all the global files.
- loadMappingFile() — Loads a mapping file with the given name and returns a map from class/entity names to their corresponding file driver elements.
public
- __construct() — Initializes a new FileDriver that looks in the given path(s) for mapping documents and operates in the specified operating mode.
- getAllClassNames() — Gets the names of all mapped classes known to this driver.
- getElement() — Get the element of schema meta data for the class from the mapping file.
- getGlobalBasename() — Retrieve global basename
- getLocator() — Retrieve the locator used to discover mapping files by className
- isTransient() — Whether the class with the specified name should have its metadata loaded.
- setGlobalBasename() — Set global basename
- setLocator() — Set the locator used to discover mapping files by className