Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
doctrine-dbal
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Tomáš Trávníček
doctrine-dbal
Commits
70c96548
Commit
70c96548
authored
Sep 12, 2008
by
romanb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
moved entitymanager and entityrepository
parent
e64e3349
Changes
17
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
20 additions
and
23 deletions
+20
-23
ClassMetadata.php
lib/Doctrine/ClassMetadata.php
+1
-1
Factory.php
lib/Doctrine/ClassMetadata/Factory.php
+1
-1
UnitOfWork.php
lib/Doctrine/Connection/UnitOfWork.php
+1
-1
Collection.php
lib/Doctrine/ORM/Collection.php
+2
-2
Entity.php
lib/Doctrine/ORM/Entity.php
+1
-1
EntityManager.php
lib/Doctrine/ORM/EntityManager.php
+3
-3
EntityRepository.php
lib/Doctrine/ORM/EntityRepository.php
+1
-2
ORMException.php
lib/Doctrine/ORM/Exceptions/ORMException.php
+1
-3
AbstractIdGenerator.php
lib/Doctrine/ORM/Id/AbstractIdGenerator.php
+1
-1
AbstractHydrator.php
lib/Doctrine/ORM/Internal/Hydration/AbstractHydrator.php
+1
-1
ObjectDriver.php
lib/Doctrine/ORM/Internal/Hydration/ObjectDriver.php
+1
-1
AbstractEntityPersister.php
lib/Doctrine/ORM/Persisters/AbstractEntityPersister.php
+1
-1
Query.php
lib/Doctrine/Query.php
+1
-1
SqlBuilder.php
lib/Doctrine/Query/SqlBuilder.php
+1
-1
Doctrine_OrmTestCase.php
tests/lib/Doctrine_OrmTestCase.php
+1
-1
Doctrine_OrmTestSuite.php
tests/lib/Doctrine_OrmTestSuite.php
+1
-1
Doctrine_EntityManagerMock.php
tests/lib/mocks/Doctrine_EntityManagerMock.php
+1
-1
No files found.
lib/Doctrine/ClassMetadata.php
View file @
70c96548
...
@@ -356,7 +356,7 @@ class Doctrine_ClassMetadata implements Doctrine_Common_Configurable, Serializab
...
@@ -356,7 +356,7 @@ class Doctrine_ClassMetadata implements Doctrine_Common_Configurable, Serializab
* @param string $entityName Name of the entity class the metadata info is used for.
* @param string $entityName Name of the entity class the metadata info is used for.
* @param Doctrine::ORM::Entitymanager $em
* @param Doctrine::ORM::Entitymanager $em
*/
*/
public
function
__construct
(
$entityName
,
Doctrine_EntityManager
$em
)
public
function
__construct
(
$entityName
,
Doctrine_
ORM_
EntityManager
$em
)
{
{
$this
->
_entityName
=
$entityName
;
$this
->
_entityName
=
$entityName
;
$this
->
_rootEntityName
=
$entityName
;
$this
->
_rootEntityName
=
$entityName
;
...
...
lib/Doctrine/ClassMetadata/Factory.php
View file @
70c96548
...
@@ -51,7 +51,7 @@ class Doctrine_ClassMetadata_Factory
...
@@ -51,7 +51,7 @@ class Doctrine_ClassMetadata_Factory
* @param $conn The connection to use.
* @param $conn The connection to use.
* @param $driver The metadata driver to use.
* @param $driver The metadata driver to use.
*/
*/
public
function
__construct
(
Doctrine_EntityManager
$em
,
$driver
)
public
function
__construct
(
Doctrine_
ORM_
EntityManager
$em
,
$driver
)
{
{
$this
->
_em
=
$em
;
$this
->
_em
=
$em
;
$this
->
_driver
=
$driver
;
$this
->
_driver
=
$driver
;
...
...
lib/Doctrine/Connection/UnitOfWork.php
View file @
70c96548
...
@@ -120,7 +120,7 @@ class Doctrine_Connection_UnitOfWork
...
@@ -120,7 +120,7 @@ class Doctrine_Connection_UnitOfWork
*
*
* @param Doctrine_EntityManager $em
* @param Doctrine_EntityManager $em
*/
*/
public
function
__construct
(
Doctrine_EntityManager
$em
)
public
function
__construct
(
Doctrine_
ORM_
EntityManager
$em
)
{
{
$this
->
_em
=
$em
;
$this
->
_em
=
$em
;
//TODO: any benefit with lazy init?
//TODO: any benefit with lazy init?
...
...
lib/Doctrine/ORM/Collection.php
View file @
70c96548
...
@@ -130,7 +130,7 @@ class Doctrine_ORM_Collection implements Countable, IteratorAggregate, Serializa
...
@@ -130,7 +130,7 @@ class Doctrine_ORM_Collection implements Countable, IteratorAggregate, Serializa
public
function
__construct
(
$entityBaseType
,
$keyField
=
null
)
public
function
__construct
(
$entityBaseType
,
$keyField
=
null
)
{
{
$this
->
_entityBaseType
=
$entityBaseType
;
$this
->
_entityBaseType
=
$entityBaseType
;
$this
->
_em
=
Doctrine_EntityManager
::
getActiveEntityManager
();
$this
->
_em
=
Doctrine_
ORM_
EntityManager
::
getActiveEntityManager
();
if
(
$keyField
!==
null
)
{
if
(
$keyField
!==
null
)
{
if
(
!
$this
->
_em
->
getClassMetadata
(
$entityBaseType
)
->
hasField
(
$keyField
))
{
if
(
!
$this
->
_em
->
getClassMetadata
(
$entityBaseType
)
->
hasField
(
$keyField
))
{
...
@@ -1018,7 +1018,7 @@ class Doctrine_ORM_Collection implements Countable, IteratorAggregate, Serializa
...
@@ -1018,7 +1018,7 @@ class Doctrine_ORM_Collection implements Countable, IteratorAggregate, Serializa
*/
*/
public
function
unserialize
(
$serialized
)
public
function
unserialize
(
$serialized
)
{
{
$manager
=
Doctrine_EntityManager
::
getActiveEntityManager
();
$manager
=
Doctrine_
ORM_
EntityManager
::
getActiveEntityManager
();
$connection
=
$manager
->
getConnection
();
$connection
=
$manager
->
getConnection
();
$array
=
unserialize
(
$serialized
);
$array
=
unserialize
(
$serialized
);
...
...
lib/Doctrine/ORM/Entity.php
View file @
70c96548
...
@@ -204,7 +204,7 @@ abstract class Doctrine_ORM_Entity implements ArrayAccess, Serializable
...
@@ -204,7 +204,7 @@ abstract class Doctrine_ORM_Entity implements ArrayAccess, Serializable
public
function
__construct
()
public
function
__construct
()
{
{
$this
->
_entityName
=
get_class
(
$this
);
$this
->
_entityName
=
get_class
(
$this
);
$this
->
_em
=
Doctrine_EntityManager
::
getActiveEntityManager
();
$this
->
_em
=
Doctrine_
ORM_
EntityManager
::
getActiveEntityManager
();
$this
->
_class
=
$this
->
_em
->
getClassMetadata
(
$this
->
_entityName
);
$this
->
_class
=
$this
->
_em
->
getClassMetadata
(
$this
->
_entityName
);
$this
->
_oid
=
self
::
$_index
++
;
$this
->
_oid
=
self
::
$_index
++
;
$this
->
_data
=
$this
->
_em
->
_getTmpEntityData
();
$this
->
_data
=
$this
->
_em
->
_getTmpEntityData
();
...
...
lib/Doctrine/EntityManager.php
→
lib/Doctrine/
ORM/
EntityManager.php
View file @
70c96548
...
@@ -38,7 +38,7 @@
...
@@ -38,7 +38,7 @@
* @version $Revision$
* @version $Revision$
* @author Roman Borschel <roman@code-factory.org>
* @author Roman Borschel <roman@code-factory.org>
*/
*/
class
Doctrine_EntityManager
class
Doctrine_
ORM_
EntityManager
{
{
/**
/**
* IMMEDIATE: Flush occurs automatically after each operation that issues database
* IMMEDIATE: Flush occurs automatically after each operation that issues database
...
@@ -498,7 +498,7 @@ class Doctrine_EntityManager
...
@@ -498,7 +498,7 @@ class Doctrine_EntityManager
if
(
$customRepositoryClassName
!==
null
)
{
if
(
$customRepositoryClassName
!==
null
)
{
$repository
=
new
$customRepositoryClassName
(
$entityName
,
$metadata
);
$repository
=
new
$customRepositoryClassName
(
$entityName
,
$metadata
);
}
else
{
}
else
{
$repository
=
new
Doctrine_EntityRepository
(
$entityName
,
$metadata
);
$repository
=
new
Doctrine_
ORM_
EntityRepository
(
$entityName
,
$metadata
);
}
}
$this
->
_repositories
[
$entityName
]
=
$repository
;
$this
->
_repositories
[
$entityName
]
=
$repository
;
...
@@ -715,7 +715,7 @@ class Doctrine_EntityManager
...
@@ -715,7 +715,7 @@ class Doctrine_EntityManager
$eventManager
=
new
Doctrine_Common_EventManager
();
$eventManager
=
new
Doctrine_Common_EventManager
();
}
}
$em
=
new
Doctrine_EntityManager
(
$conn
,
$name
,
$config
,
$eventManager
);
$em
=
new
Doctrine_
ORM_
EntityManager
(
$conn
,
$name
,
$config
,
$eventManager
);
$em
->
activate
();
$em
->
activate
();
return
$em
;
return
$em
;
...
...
lib/Doctrine/EntityRepository.php
→
lib/Doctrine/
ORM/
EntityRepository.php
View file @
70c96548
...
@@ -33,9 +33,8 @@
...
@@ -33,9 +33,8 @@
* @since 2.0
* @since 2.0
* @version $Revision$
* @version $Revision$
* @author Roman Borschel <roman@code-factory.org>
* @author Roman Borschel <roman@code-factory.org>
* @todo package:orm
*/
*/
class
Doctrine_EntityRepository
class
Doctrine_
ORM_
EntityRepository
{
{
protected
$_entityName
;
protected
$_entityName
;
protected
$_em
;
protected
$_em
;
...
...
lib/Doctrine/ORM/Exceptions/ORMException.php
View file @
70c96548
...
@@ -34,6 +34,4 @@
...
@@ -34,6 +34,4 @@
* @author Roman Borschel <roman@code-factory.org>
* @author Roman Borschel <roman@code-factory.org>
*/
*/
class
Doctrine_ORM_Exceptions_ORMException
extends
Doctrine_Common_Exceptions_DoctrineException
class
Doctrine_ORM_Exceptions_ORMException
extends
Doctrine_Common_Exceptions_DoctrineException
{
{}
}
lib/Doctrine/ORM/Id/AbstractIdGenerator.php
View file @
70c96548
...
@@ -13,7 +13,7 @@ abstract class Doctrine_ORM_Id_AbstractIdGenerator
...
@@ -13,7 +13,7 @@ abstract class Doctrine_ORM_Id_AbstractIdGenerator
protected
$_em
;
protected
$_em
;
public
function
__construct
(
Doctrine_EntityManager
$em
)
public
function
__construct
(
Doctrine_
ORM_
EntityManager
$em
)
{
{
$this
->
_em
=
$em
;
$this
->
_em
=
$em
;
}
}
...
...
lib/Doctrine/ORM/Internal/Hydration/AbstractHydrator.php
View file @
70c96548
...
@@ -66,7 +66,7 @@ abstract class Doctrine_ORM_Internal_Hydration_AbstractHydrator
...
@@ -66,7 +66,7 @@ abstract class Doctrine_ORM_Internal_Hydration_AbstractHydrator
*
*
* @param Doctrine_Connection|null $connection
* @param Doctrine_Connection|null $connection
*/
*/
public
function
__construct
(
Doctrine_EntityManager
$em
)
public
function
__construct
(
Doctrine_
ORM_
EntityManager
$em
)
{
{
$this
->
_em
=
$em
;
$this
->
_em
=
$em
;
$this
->
_nullObject
=
Doctrine_ORM_Internal_Null
::
$INSTANCE
;
$this
->
_nullObject
=
Doctrine_ORM_Internal_Null
::
$INSTANCE
;
...
...
lib/Doctrine/ORM/Internal/Hydration/ObjectDriver.php
View file @
70c96548
...
@@ -41,7 +41,7 @@ class Doctrine_ORM_Internal_Hydration_ObjectDriver
...
@@ -41,7 +41,7 @@ class Doctrine_ORM_Internal_Hydration_ObjectDriver
/** The EntityManager */
/** The EntityManager */
private
$_em
;
private
$_em
;
public
function
__construct
(
Doctrine_EntityManager
$em
)
public
function
__construct
(
Doctrine_
ORM_
EntityManager
$em
)
{
{
$this
->
_nullObject
=
Doctrine_ORM_Internal_Null
::
$INSTANCE
;
$this
->
_nullObject
=
Doctrine_ORM_Internal_Null
::
$INSTANCE
;
$this
->
_em
=
$em
;
$this
->
_em
=
$em
;
...
...
lib/Doctrine/ORM/Persisters/AbstractEntityPersister.php
View file @
70c96548
...
@@ -74,7 +74,7 @@ abstract class Doctrine_ORM_Persisters_AbstractEntityPersister
...
@@ -74,7 +74,7 @@ abstract class Doctrine_ORM_Persisters_AbstractEntityPersister
/**
/**
* Constructs a new EntityPersister.
* Constructs a new EntityPersister.
*/
*/
public
function
__construct
(
Doctrine_EntityManager
$em
,
Doctrine_ClassMetadata
$classMetadata
)
public
function
__construct
(
Doctrine_
ORM_
EntityManager
$em
,
Doctrine_ClassMetadata
$classMetadata
)
{
{
$this
->
_em
=
$em
;
$this
->
_em
=
$em
;
$this
->
_entityName
=
$classMetadata
->
getClassName
();
$this
->
_entityName
=
$classMetadata
->
getClassName
();
...
...
lib/Doctrine/Query.php
View file @
70c96548
...
@@ -93,7 +93,7 @@ class Doctrine_Query extends Doctrine_Query_Abstract
...
@@ -93,7 +93,7 @@ class Doctrine_Query extends Doctrine_Query_Abstract
// End of Caching Stuff
// End of Caching Stuff
public
function
__construct
(
Doctrine_EntityManager
$entityManager
)
public
function
__construct
(
Doctrine_
ORM_
EntityManager
$entityManager
)
{
{
$this
->
_entityManager
=
$entityManager
;
$this
->
_entityManager
=
$entityManager
;
$this
->
_hydrator
=
new
Doctrine_ORM_Internal_Hydration_StandardHydrator
(
$entityManager
);
$this
->
_hydrator
=
new
Doctrine_ORM_Internal_Hydration_StandardHydrator
(
$entityManager
);
...
...
lib/Doctrine/Query/SqlBuilder.php
View file @
70c96548
...
@@ -42,7 +42,7 @@ abstract class Doctrine_Query_SqlBuilder
...
@@ -42,7 +42,7 @@ abstract class Doctrine_Query_SqlBuilder
protected
$_connection
;
protected
$_connection
;
public
static
function
fromConnection
(
Doctrine_EntityManager
$entityManager
)
public
static
function
fromConnection
(
Doctrine_
ORM_
EntityManager
$entityManager
)
{
{
$connection
=
$entityManager
->
getConnection
();
$connection
=
$entityManager
->
getConnection
();
...
...
tests/lib/Doctrine_OrmTestCase.php
View file @
70c96548
...
@@ -22,7 +22,7 @@ class Doctrine_OrmTestCase extends Doctrine_TestCase
...
@@ -22,7 +22,7 @@ class Doctrine_OrmTestCase extends Doctrine_TestCase
'user'
=>
'john'
,
'user'
=>
'john'
,
'password'
=>
'wayne'
'password'
=>
'wayne'
);
);
$em
=
Doctrine_EntityManager
::
create
(
$connectionOptions
,
'mockEM'
,
$config
,
$eventManager
);
$em
=
Doctrine_
ORM_
EntityManager
::
create
(
$connectionOptions
,
'mockEM'
,
$config
,
$eventManager
);
$this
->
_em
=
$em
;
$this
->
_em
=
$em
;
}
}
$this
->
_em
->
activate
();
$this
->
_em
->
activate
();
...
...
tests/lib/Doctrine_OrmTestSuite.php
View file @
70c96548
...
@@ -17,7 +17,7 @@ class Doctrine_OrmTestSuite extends Doctrine_TestSuite
...
@@ -17,7 +17,7 @@ class Doctrine_OrmTestSuite extends Doctrine_TestSuite
'user'
=>
'john'
,
'user'
=>
'john'
,
'password'
=>
'wayne'
'password'
=>
'wayne'
);
);
$em
=
Doctrine_EntityManager
::
create
(
$connectionOptions
,
'mockEM'
,
$config
,
$eventManager
);
$em
=
Doctrine_
ORM_
EntityManager
::
create
(
$connectionOptions
,
'mockEM'
,
$config
,
$eventManager
);
$this
->
sharedFixture
[
'em'
]
=
$em
;
$this
->
sharedFixture
[
'em'
]
=
$em
;
}
}
...
...
tests/lib/mocks/Doctrine_EntityManagerMock.php
View file @
70c96548
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
require_once
'lib/mocks/Doctrine_EntityPersisterMock.php'
;
require_once
'lib/mocks/Doctrine_EntityPersisterMock.php'
;
class
Doctrine_EntityManagerMock
extends
Doctrine_EntityManager
class
Doctrine_EntityManagerMock
extends
Doctrine_
ORM_
EntityManager
{
{
private
$_persisterMock
;
private
$_persisterMock
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment