1
0
mirror of synced 2025-01-18 14:31:40 +03:00

moved classmetadata & co

This commit is contained in:
romanb 2008-09-12 17:39:39 +00:00
parent c3ad955912
commit d4e554fb44
9 changed files with 15 additions and 15 deletions

View File

@ -155,8 +155,8 @@ class Doctrine_ORM_EntityManager
$this->_name = $name;
$this->_config = $config;
$this->_eventManager = $eventManager;
$this->_metadataFactory = new Doctrine_ClassMetadata_Factory(
$this, new Doctrine_ClassMetadata_CodeDriver());
$this->_metadataFactory = new Doctrine_ORM_Mapping_ClassMetadataFactory(
$this, new Doctrine_ORM_Mapping_Driver_CodeDriver());
$this->_unitOfWork = new Doctrine_ORM_UnitOfWork($this);
$this->_nullObject = Doctrine_ORM_Internal_Null::$INSTANCE;
}

View File

@ -32,7 +32,7 @@
* @since 2.0
* @todo Rename to ClassDescriptor.
*/
class Doctrine_ClassMetadata implements Doctrine_Common_Configurable, Serializable
class Doctrine_ORM_Mapping_ClassMetadata implements Doctrine_Common_Configurable, Serializable
{
/* The inheritance mapping types */
/**

View File

@ -33,7 +33,7 @@
* @since 2.0
* @todo Rename to ClassDescriptorFactory.
*/
class Doctrine_ClassMetadata_Factory
class Doctrine_ORM_Mapping_ClassMetadataFactory
{
protected $_em;
protected $_driver;
@ -102,7 +102,7 @@ class Doctrine_ClassMetadata_Factory
$class = $classes[$loadedParentClass];
} else {
$rootClassOfHierarchy = count($parentClasses) > 0 ? array_shift($parentClasses) : $name;
$class = new Doctrine_ClassMetadata($rootClassOfHierarchy, $this->_em);
$class = new Doctrine_ORM_Mapping_ClassMetadata($rootClassOfHierarchy, $this->_em);
$this->_loadMetadata($class, $rootClassOfHierarchy);
$classes[$rootClassOfHierarchy] = $class;
}
@ -117,7 +117,7 @@ class Doctrine_ClassMetadata_Factory
// Move down the hierarchy of parent classes, starting from the topmost class
$parent = $class;
foreach ($parentClasses as $subclassName) {
$subClass = new Doctrine_ClassMetadata($subclassName, $this->_em);
$subClass = new Doctrine_ORM_Mapping_ClassMetadata($subclassName, $this->_em);
$subClass->setInheritanceType($parent->getInheritanceType(), $parent->getInheritanceOptions());
$this->_addInheritedFields($subClass, $parent);
$this->_addInheritedRelations($subClass, $parent);
@ -166,7 +166,7 @@ class Doctrine_ClassMetadata_Factory
* @param Doctrine_ClassMetadata $class The container for the metadata.
* @param string $name The name of the class for which the metadata will be loaded.
*/
protected function _loadMetadata(Doctrine_ClassMetadata $class, $name)
protected function _loadMetadata(Doctrine_ORM_Mapping_ClassMetadata $class, $name)
{
if ( ! class_exists($name) || empty($name)) {
throw new Doctrine_Exception("Couldn't find class " . $name . ".");

View File

@ -32,7 +32,7 @@
* @link www.phpdoctrine.org
* @since 2.0
*/
class Doctrine_ClassMetadata_CodeDriver
class Doctrine_ORM_Mapping_Driver_CodeDriver
{
/**
* Name of the callback method.
@ -44,7 +44,7 @@ class Doctrine_ClassMetadata_CodeDriver
/**
* Loads the metadata for the specified class into the provided container.
*/
public function loadMetadataForClass($className, Doctrine_ClassMetadata $metadata)
public function loadMetadataForClass($className, Doctrine_ORM_Mapping_ClassMetadata $metadata)
{
if ( ! method_exists($className, self::CALLBACK_METHOD)) {
throw new Doctrine_ClassMetadata_Exception("Unable to load metadata for class"

View File

@ -4,12 +4,12 @@
* The yaml driver loads metadata informations about classes from .yml files.
*
*/
class Doctrine_ClassMetadata_YamlDriver
class Doctrine_ORM_Mapping_Driver_YamlDriver
{
/**
*
*/
public function loadMetadataForClass($className, Doctrine_ClassMetadata $metadata)
public function loadMetadataForClass($className, Doctrine_ORM_Mapping_ClassMetadata $metadata)
{
throw new Doctrine_ClassMetadata_Exception("YAML driver not yet implemented.");
}

View File

@ -74,7 +74,7 @@ abstract class Doctrine_ORM_Persisters_AbstractEntityPersister
/**
* Constructs a new EntityPersister.
*/
public function __construct(Doctrine_ORM_EntityManager $em, Doctrine_ClassMetadata $classMetadata)
public function __construct(Doctrine_ORM_EntityManager $em, Doctrine_ORM_Mapping_ClassMetadata $classMetadata)
{
$this->_em = $em;
$this->_entityName = $classMetadata->getClassName();

View File

@ -45,7 +45,7 @@ class Orm_Query_IdentifierRecognitionTest extends Doctrine_OrmTestCase
$decl = $parserResult->getQueryComponent('u');
$this->assertTrue($decl['metadata'] instanceof Doctrine_ClassMetadata);
$this->assertTrue($decl['metadata'] instanceof Doctrine_ORM_Mapping_ClassMetadata);
$this->assertEquals(null, $decl['relation']);
$this->assertEquals(null, $decl['parent']);
$this->assertEquals(null, $decl['scalar']);
@ -60,7 +60,7 @@ class Orm_Query_IdentifierRecognitionTest extends Doctrine_OrmTestCase
$decl = $parserResult->getQueryComponent('u');
$this->assertTrue($decl['metadata'] instanceof Doctrine_ClassMetadata);
$this->assertTrue($decl['metadata'] instanceof Doctrine_ORM_Mapping_ClassMetadata);
$this->assertEquals(null, $decl['relation']);
$this->assertEquals(null, $decl['parent']);
$this->assertEquals(null, $decl['scalar']);

View File

@ -1,6 +1,6 @@
<?php
class Doctrine_ClassMetadataMock extends Doctrine_ClassMetadata
class Doctrine_ClassMetadataMock extends Doctrine_ORM_Mapping_ClassMetadata
{