From 169aa63402e43ad5b115785eee4fdc3789f47255 Mon Sep 17 00:00:00 2001 From: romanb Date: Fri, 12 Sep 2008 09:44:51 +0000 Subject: [PATCH] moved entitypersisters --- .../Persisters/AbstractEntityPersister.php} | 2 +- lib/Doctrine/{EntityPersister => ORM/Persisters}/Exception.php | 0 .../Persisters/JoinedSubclassPersister.php} | 2 +- lib/Doctrine/ORM/Persisters/SingleTablePersister.php | 3 +++ .../Persisters/StandardEntityPersister.php} | 2 +- lib/Doctrine/ORM/Persisters/UnionSubclassPersister.php | 3 +++ tests/Orm/EntityPersisterTest.php | 2 +- tests/lib/mocks/Doctrine_EntityPersisterMock.php | 2 +- 8 files changed, 11 insertions(+), 5 deletions(-) rename lib/Doctrine/{EntityPersister/Abstract.php => ORM/Persisters/AbstractEntityPersister.php} (99%) rename lib/Doctrine/{EntityPersister => ORM/Persisters}/Exception.php (100%) rename lib/Doctrine/{EntityPersister/JoinedSubclass.php => ORM/Persisters/JoinedSubclassPersister.php} (98%) create mode 100644 lib/Doctrine/ORM/Persisters/SingleTablePersister.php rename lib/Doctrine/{EntityPersister/Standard.php => ORM/Persisters/StandardEntityPersister.php} (97%) create mode 100644 lib/Doctrine/ORM/Persisters/UnionSubclassPersister.php diff --git a/lib/Doctrine/EntityPersister/Abstract.php b/lib/Doctrine/ORM/Persisters/AbstractEntityPersister.php similarity index 99% rename from lib/Doctrine/EntityPersister/Abstract.php rename to lib/Doctrine/ORM/Persisters/AbstractEntityPersister.php index b27c14cdf..c8454cfc3 100644 --- a/lib/Doctrine/EntityPersister/Abstract.php +++ b/lib/Doctrine/ORM/Persisters/AbstractEntityPersister.php @@ -31,7 +31,7 @@ * @since 2.0 * @todo Rename to AbstractEntityPersister */ -abstract class Doctrine_EntityPersister_Abstract +abstract class Doctrine_ORM_Persisters_AbstractEntityPersister { /** * The names of all the fields that are available on entities. diff --git a/lib/Doctrine/EntityPersister/Exception.php b/lib/Doctrine/ORM/Persisters/Exception.php similarity index 100% rename from lib/Doctrine/EntityPersister/Exception.php rename to lib/Doctrine/ORM/Persisters/Exception.php diff --git a/lib/Doctrine/EntityPersister/JoinedSubclass.php b/lib/Doctrine/ORM/Persisters/JoinedSubclassPersister.php similarity index 98% rename from lib/Doctrine/EntityPersister/JoinedSubclass.php rename to lib/Doctrine/ORM/Persisters/JoinedSubclassPersister.php index b144eea3d..777b7cfbf 100644 --- a/lib/Doctrine/EntityPersister/JoinedSubclass.php +++ b/lib/Doctrine/ORM/Persisters/JoinedSubclassPersister.php @@ -29,7 +29,7 @@ * @link www.phpdoctrine.org * @since 2.0 */ -class Doctrine_EntityPersister_JoinedSubclass extends Doctrine_EntityPersister_Abstract +class Doctrine_ORM_Persisters_JoinedSubclassPersister extends Doctrine_ORM_Persisters_AbstractEntityPersister { /** * Inserts an entity that is part of a Class Table Inheritance hierarchy. diff --git a/lib/Doctrine/ORM/Persisters/SingleTablePersister.php b/lib/Doctrine/ORM/Persisters/SingleTablePersister.php new file mode 100644 index 000000000..15c5adc7f --- /dev/null +++ b/lib/Doctrine/ORM/Persisters/SingleTablePersister.php @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/lib/Doctrine/EntityPersister/Standard.php b/lib/Doctrine/ORM/Persisters/StandardEntityPersister.php similarity index 97% rename from lib/Doctrine/EntityPersister/Standard.php rename to lib/Doctrine/ORM/Persisters/StandardEntityPersister.php index 67c315c3c..f06ebde78 100644 --- a/lib/Doctrine/EntityPersister/Standard.php +++ b/lib/Doctrine/ORM/Persisters/StandardEntityPersister.php @@ -29,7 +29,7 @@ * @link www.phpdoctrine.org * @since 2.0 */ -class Doctrine_EntityPersister_Standard extends Doctrine_EntityPersister_Abstract +class Doctrine_ORM_Persisters_StandardEntityPersister extends Doctrine_ORM_Persisters_AbstractEntityPersister { /** * Deletes an entity. diff --git a/lib/Doctrine/ORM/Persisters/UnionSubclassPersister.php b/lib/Doctrine/ORM/Persisters/UnionSubclassPersister.php new file mode 100644 index 000000000..15c5adc7f --- /dev/null +++ b/lib/Doctrine/ORM/Persisters/UnionSubclassPersister.php @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/tests/Orm/EntityPersisterTest.php b/tests/Orm/EntityPersisterTest.php index b29749b2c..6e8bc53d2 100644 --- a/tests/Orm/EntityPersisterTest.php +++ b/tests/Orm/EntityPersisterTest.php @@ -23,7 +23,7 @@ class Orm_EntityPersisterTest extends Doctrine_OrmTestCase $this->_classMetadataMock = new Doctrine_ClassMetadataMock("ForumUser", $this->_emMock); $this->_classMetadataMock->setIdGenerator($this->_idGenMock); $this->_connMock->setDatabasePlatform(new Doctrine_DatabasePlatformMock()); - $this->_persister = new Doctrine_EntityPersister_Standard( + $this->_persister = new Doctrine_ORM_Persisters_StandardEntityPersister( $this->_emMock, $this->_emMock->getClassMetadata("ForumUser")); $this->_emMock->activate(); diff --git a/tests/lib/mocks/Doctrine_EntityPersisterMock.php b/tests/lib/mocks/Doctrine_EntityPersisterMock.php index 934c7f845..7166f70f8 100644 --- a/tests/lib/mocks/Doctrine_EntityPersisterMock.php +++ b/tests/lib/mocks/Doctrine_EntityPersisterMock.php @@ -1,6 +1,6 @@