diff --git a/lib/Doctrine/ORM/Mapping/Driver/AnnotationDriver.php b/lib/Doctrine/ORM/Mapping/Driver/AnnotationDriver.php index 0dbc4199c..203dd42e0 100644 --- a/lib/Doctrine/ORM/Mapping/Driver/AnnotationDriver.php +++ b/lib/Doctrine/ORM/Mapping/Driver/AnnotationDriver.php @@ -22,10 +22,10 @@ namespace Doctrine\ORM\Mapping\Driver; use Doctrine\Common\Cache\ArrayCache, Doctrine\Common\Annotations\AnnotationReader, Doctrine\Common\Annotations\AnnotationRegistry, - Doctrine\ORM\Mapping\ClassMetadataInfo, Doctrine\ORM\Mapping\MappingException, Doctrine\ORM\Mapping\JoinColumn, - Doctrine\ORM\Mapping\Column; + Doctrine\ORM\Mapping\Column, + Doctrine\Common\Persistence\Mapping\ClassMetadata; /** * The AnnotationDriver reads the mapping metadata from docblock annotations. @@ -133,7 +133,7 @@ class AnnotationDriver implements Driver /** * {@inheritdoc} */ - public function loadMetadataForClass($className, ClassMetadataInfo $metadata) + public function loadMetadataForClass($className, ClassMetadata $metadata) { $class = $metadata->getReflectionClass(); if ( ! $class) { diff --git a/lib/Doctrine/ORM/Mapping/Driver/DatabaseDriver.php b/lib/Doctrine/ORM/Mapping/Driver/DatabaseDriver.php index 37e0dc93d..868835a35 100644 --- a/lib/Doctrine/ORM/Mapping/Driver/DatabaseDriver.php +++ b/lib/Doctrine/ORM/Mapping/Driver/DatabaseDriver.php @@ -23,6 +23,7 @@ use Doctrine\Common\Cache\ArrayCache, Doctrine\Common\Annotations\AnnotationReader, Doctrine\DBAL\Schema\AbstractSchemaManager, Doctrine\DBAL\Schema\SchemaException, + Doctrine\Common\Persistence\Mapping\ClassMetadata, Doctrine\ORM\Mapping\ClassMetadataInfo, Doctrine\ORM\Mapping\MappingException, Doctrine\Common\Util\Inflector; @@ -156,7 +157,7 @@ class DatabaseDriver implements Driver /** * {@inheritdoc} */ - public function loadMetadataForClass($className, ClassMetadataInfo $metadata) + public function loadMetadataForClass($className, ClassMetadata $metadata) { $this->reverseEngineerMappingFromDatabase(); diff --git a/lib/Doctrine/ORM/Mapping/Driver/Driver.php b/lib/Doctrine/ORM/Mapping/Driver/Driver.php index 409d357dc..2ec4866f7 100644 --- a/lib/Doctrine/ORM/Mapping/Driver/Driver.php +++ b/lib/Doctrine/ORM/Mapping/Driver/Driver.php @@ -19,7 +19,7 @@ namespace Doctrine\ORM\Mapping\Driver; -use Doctrine\ORM\Mapping\ClassMetadataInfo; +use Doctrine\Common\Persistence\Mapping\Driver\MappingDriver; /** * Contract for metadata drivers. @@ -28,30 +28,6 @@ use Doctrine\ORM\Mapping\ClassMetadataInfo; * @author Jonathan H. Wage * @todo Rename: MetadataDriver or MappingDriver */ -interface Driver +interface Driver extends MappingDriver { - /** - * Loads the metadata for the specified class into the provided container. - * - * @param string $className - * @param ClassMetadataInfo $metadata - */ - function loadMetadataForClass($className, ClassMetadataInfo $metadata); - - /** - * Gets the names of all mapped classes known to this driver. - * - * @return array The names of all mapped classes known to this driver. - */ - function getAllClassNames(); - - /** - * 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. - * - * @param string $className - * @return boolean - */ - function isTransient($className); -} +} \ No newline at end of file diff --git a/lib/Doctrine/ORM/Mapping/Driver/DriverChain.php b/lib/Doctrine/ORM/Mapping/Driver/DriverChain.php index 4c135a6c0..8536d7365 100644 --- a/lib/Doctrine/ORM/Mapping/Driver/DriverChain.php +++ b/lib/Doctrine/ORM/Mapping/Driver/DriverChain.php @@ -20,7 +20,7 @@ namespace Doctrine\ORM\Mapping\Driver; use Doctrine\ORM\Mapping\Driver\Driver, - Doctrine\ORM\Mapping\ClassMetadataInfo, + Doctrine\Common\Persistence\Mapping\ClassMetadata, Doctrine\ORM\Mapping\MappingException; /** @@ -93,9 +93,9 @@ class DriverChain implements Driver * Loads the metadata for the specified class into the provided container. * * @param string $className - * @param ClassMetadataInfo $metadata + * @param ClassMetadata $metadata */ - public function loadMetadataForClass($className, ClassMetadataInfo $metadata) + public function loadMetadataForClass($className, ClassMetadata $metadata) { foreach ($this->drivers as $namespace => $driver) { if (strpos($className, $namespace) === 0) { diff --git a/lib/Doctrine/ORM/Mapping/Driver/PHPDriver.php b/lib/Doctrine/ORM/Mapping/Driver/PHPDriver.php index b6f28c48c..1e3f7f686 100644 --- a/lib/Doctrine/ORM/Mapping/Driver/PHPDriver.php +++ b/lib/Doctrine/ORM/Mapping/Driver/PHPDriver.php @@ -22,13 +22,13 @@ namespace Doctrine\ORM\Mapping\Driver; use Doctrine\Common\Cache\ArrayCache, Doctrine\Common\Annotations\AnnotationReader, Doctrine\DBAL\Schema\AbstractSchemaManager, - Doctrine\ORM\Mapping\ClassMetadataInfo, + 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 ClassMetadataInfo + * The PHPDriver includes php files which just populate ClassMetadata * instances with plain php code * * @license http://www.opensource.org/licenses/lgpl-license.php LGPL @@ -52,7 +52,7 @@ class PHPDriver extends AbstractFileDriver /** * {@inheritdoc} */ - public function loadMetadataForClass($className, ClassMetadataInfo $metadata) + public function loadMetadataForClass($className, ClassMetadata $metadata) { $this->_metadata = $metadata; $this->_loadMappingFile($this->_findMappingFile($className)); diff --git a/lib/Doctrine/ORM/Mapping/Driver/StaticPHPDriver.php b/lib/Doctrine/ORM/Mapping/Driver/StaticPHPDriver.php index eea4d094b..4430d4c7f 100644 --- a/lib/Doctrine/ORM/Mapping/Driver/StaticPHPDriver.php +++ b/lib/Doctrine/ORM/Mapping/Driver/StaticPHPDriver.php @@ -19,7 +19,7 @@ namespace Doctrine\ORM\Mapping\Driver; -use Doctrine\ORM\Mapping\ClassMetadataInfo, +use Doctrine\Common\Persistence\Mapping\ClassMetadata, Doctrine\ORM\Mapping\MappingException; /** @@ -70,7 +70,7 @@ class StaticPHPDriver implements Driver /** * {@inheritdoc} */ - public function loadMetadataForClass($className, ClassMetadataInfo $metadata) + public function loadMetadataForClass($className, ClassMetadata $metadata) { call_user_func_array(array($className, 'loadMetadata'), array($metadata)); } diff --git a/lib/Doctrine/ORM/Mapping/Driver/XmlDriver.php b/lib/Doctrine/ORM/Mapping/Driver/XmlDriver.php index 6bea5523b..46b46dc5f 100644 --- a/lib/Doctrine/ORM/Mapping/Driver/XmlDriver.php +++ b/lib/Doctrine/ORM/Mapping/Driver/XmlDriver.php @@ -20,7 +20,7 @@ namespace Doctrine\ORM\Mapping\Driver; use SimpleXMLElement, - Doctrine\ORM\Mapping\ClassMetadataInfo, + Doctrine\Common\Persistence\Mapping\ClassMetadata, Doctrine\ORM\Mapping\MappingException; /** @@ -44,7 +44,7 @@ class XmlDriver extends AbstractFileDriver /** * {@inheritdoc} */ - public function loadMetadataForClass($className, ClassMetadataInfo $metadata) + public function loadMetadataForClass($className, ClassMetadata $metadata) { $xmlRoot = $this->getElement($className); diff --git a/lib/Doctrine/ORM/Mapping/Driver/YamlDriver.php b/lib/Doctrine/ORM/Mapping/Driver/YamlDriver.php index 1ee8dd147..fb31c5416 100644 --- a/lib/Doctrine/ORM/Mapping/Driver/YamlDriver.php +++ b/lib/Doctrine/ORM/Mapping/Driver/YamlDriver.php @@ -19,7 +19,7 @@ namespace Doctrine\ORM\Mapping\Driver; -use Doctrine\ORM\Mapping\ClassMetadataInfo, +use Doctrine\Common\Persistence\Mapping\ClassMetadata, Doctrine\ORM\Mapping\MappingException; /** @@ -41,7 +41,7 @@ class YamlDriver extends AbstractFileDriver /** * {@inheritdoc} */ - public function loadMetadataForClass($className, ClassMetadataInfo $metadata) + public function loadMetadataForClass($className, ClassMetadata $metadata) { $element = $this->getElement($className); diff --git a/tests/Doctrine/Tests/Mocks/MetadataDriverMock.php b/tests/Doctrine/Tests/Mocks/MetadataDriverMock.php index fb533f465..87f560e64 100644 --- a/tests/Doctrine/Tests/Mocks/MetadataDriverMock.php +++ b/tests/Doctrine/Tests/Mocks/MetadataDriverMock.php @@ -4,7 +4,7 @@ namespace Doctrine\Tests\Mocks; class MetadataDriverMock implements \Doctrine\ORM\Mapping\Driver\Driver { - public function loadMetadataForClass($className, \Doctrine\ORM\Mapping\ClassMetadataInfo $metadata) + public function loadMetadataForClass($className, \Doctrine\Common\Persistence\Mapping\ClassMetadata $metadata) { return; }