1
0
mirror of synced 2025-01-30 03:51:43 +03:00

move naming classes to Doctrine\ORM\Mapping

This commit is contained in:
Fabio B. Silva 2011-12-24 12:01:25 -02:00
parent 1eddb53d6c
commit e3acf43dbc
9 changed files with 15 additions and 17 deletions

View File

@ -24,7 +24,9 @@ use Doctrine\Common\Cache\Cache,
Doctrine\Common\Annotations\AnnotationRegistry,
Doctrine\Common\Annotations\AnnotationReader,
Doctrine\ORM\Mapping\Driver\Driver,
Doctrine\ORM\Mapping\Driver\AnnotationDriver;
Doctrine\ORM\Mapping\Driver\AnnotationDriver,
Doctrine\ORM\Mapping\NamingStrategy,
Doctrine\ORM\Mapping\DefaultNamingStrategy;
/**
* Configuration container for all configuration options of Doctrine.

View File

@ -21,8 +21,6 @@ namespace Doctrine\ORM\Mapping;
use ReflectionClass, ReflectionProperty;
use Doctrine\Common\Persistence\Mapping\ClassMetadata AS IClassMetadata;
use Doctrine\ORM\DefaultNamingStrategy;
use Doctrine\ORM\NamingStrategy;
/**
* A <tt>ClassMetadata</tt> instance holds all the object-relational mapping metadata

View File

@ -21,8 +21,6 @@ namespace Doctrine\ORM\Mapping;
use Doctrine\DBAL\Types\Type;
use ReflectionClass;
use Doctrine\ORM\DefaultNamingStrategy;
use Doctrine\ORM\NamingStrategy;
/**
* A <tt>ClassMetadata</tt> instance holds all the object-relational mapping metadata

View File

@ -18,7 +18,7 @@
* <http://www.doctrine-project.org>.
*/
namespace Doctrine\ORM;
namespace Doctrine\ORM\Mapping;
/**
* The default NamingStrategy

View File

@ -18,7 +18,7 @@
* <http://www.doctrine-project.org>.
*/
namespace Doctrine\ORM;
namespace Doctrine\ORM\Mapping;
/**
* A set of rules for determining the physical column and table names

View File

@ -18,7 +18,7 @@
* <http://www.doctrine-project.org>.
*/
namespace Doctrine\ORM;
namespace Doctrine\ORM\Mapping;
/**
* The default NamingStrategy

View File

@ -405,9 +405,9 @@ abstract class AbstractMappingDriverTest extends \Doctrine\Tests\OrmTestCase
$factory->setEntityManager($em);
$this->assertInstanceOf('Doctrine\ORM\DefaultNamingStrategy', $em->getConfiguration()->getNamingStrategy());
$em->getConfiguration()->setNamingStrategy(new \Doctrine\ORM\UnderscoreNamingStrategy(CASE_UPPER));
$this->assertInstanceOf('Doctrine\ORM\UnderscoreNamingStrategy', $em->getConfiguration()->getNamingStrategy());
$this->assertInstanceOf('Doctrine\ORM\Mapping\DefaultNamingStrategy', $em->getConfiguration()->getNamingStrategy());
$em->getConfiguration()->setNamingStrategy(new \Doctrine\ORM\Mapping\UnderscoreNamingStrategy(CASE_UPPER));
$this->assertInstanceOf('Doctrine\ORM\Mapping\UnderscoreNamingStrategy', $em->getConfiguration()->getNamingStrategy());
$class = $factory->getMetadataFor('Doctrine\Tests\Models\DDC1476\DDC1476EntityWithDefaultFieldType');

View File

@ -298,7 +298,7 @@ class ClassMetadataTest extends \Doctrine\Tests\OrmTestCase
*/
public function testUnderscoreNamingStrategyDefaults()
{
$namingStrategy = new \Doctrine\ORM\UnderscoreNamingStrategy(CASE_UPPER);
$namingStrategy = new \Doctrine\ORM\Mapping\UnderscoreNamingStrategy(CASE_UPPER);
$oneToOneMetadata = new ClassMetadata('Doctrine\Tests\Models\CMS\CmsAddress', $namingStrategy);
$manyToManyMetadata = new ClassMetadata('Doctrine\Tests\Models\CMS\CmsAddress', $namingStrategy);

View File

@ -1,12 +1,12 @@
<?php
namespace Doctrine\Tests\ORM;
namespace Doctrine\Tests\ORM\Mapping;
use Doctrine\ORM\UnderscoreNamingStrategy;
use Doctrine\ORM\DefaultNamingStrategy;
use Doctrine\ORM\NamingStrategy;
use Doctrine\ORM\Mapping\UnderscoreNamingStrategy;
use Doctrine\ORM\Mapping\DefaultNamingStrategy;
use Doctrine\ORM\Mapping\NamingStrategy;
require_once __DIR__ . '/../TestInit.php';
require_once __DIR__ . '/../../TestInit.php';
/**
* @group DDC-559