. */ namespace Doctrine\ORM\Mapping\Driver; use Doctrine\Common\Cache\ArrayCache, Doctrine\Common\Annotations\AnnotationReader, Doctrine\DBAL\Schema\AbstractSchemaManager, Doctrine\Common\Persistence\Mapping\ClassMetadata, Doctrine\ORM\Mapping\MappingException, Doctrine\Common\Util\Inflector, Doctrine\ORM\Mapping\Driver\AbstractFileDriver; /** * The PHPDriver includes php files which just populate ClassMetadata * instances with plain php code * * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @link www.doctrine-project.org * @since 2.0 * @version $Revision$ * @author Benjamin Eberlei * @author Guilherme Blanco * @author Jonathan H. Wage * @author Roman Borschel * @todo Rename: PHPDriver */ class PHPDriver extends AbstractFileDriver { /** * {@inheritdoc} */ protected $_fileExtension = '.php'; protected $_metadata; /** * {@inheritdoc} */ public function loadMetadataForClass($className, ClassMetadata $metadata) { $this->_metadata = $metadata; $this->_loadMappingFile($this->_findMappingFile($className)); } /** * {@inheritdoc} */ protected function _loadMappingFile($file) { $metadata = $this->_metadata; include $file; } }