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
d4e554fb
Commit
d4e554fb
authored
Sep 12, 2008
by
romanb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
moved classmetadata & co
parent
c3ad9559
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
15 additions
and
15 deletions
+15
-15
EntityManager.php
lib/Doctrine/ORM/EntityManager.php
+2
-2
ClassMetadata.php
lib/Doctrine/ORM/Mapping/ClassMetadata.php
+1
-1
ClassMetadataFactory.php
lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php
+4
-4
CodeDriver.php
lib/Doctrine/ORM/Mapping/Driver/CodeDriver.php
+2
-2
YamlDriver.php
lib/Doctrine/ORM/Mapping/Driver/YamlDriver.php
+2
-2
Exception.php
lib/Doctrine/ORM/Mapping/Exception.php
+0
-0
AbstractEntityPersister.php
lib/Doctrine/ORM/Persisters/AbstractEntityPersister.php
+1
-1
IdentifierRecognitionTest.php
tests/Orm/Query/IdentifierRecognitionTest.php
+2
-2
Doctrine_ClassMetadataMock.php
tests/lib/mocks/Doctrine_ClassMetadataMock.php
+1
-1
No files found.
lib/Doctrine/ORM/EntityManager.php
View file @
d4e554fb
...
...
@@ -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_ClassMetadata
Factory
(
$this
,
new
Doctrine_
ORM_Mapping_Driver
_CodeDriver
());
$this
->
_unitOfWork
=
new
Doctrine_ORM_UnitOfWork
(
$this
);
$this
->
_nullObject
=
Doctrine_ORM_Internal_Null
::
$INSTANCE
;
}
...
...
lib/Doctrine/ClassMetadata.php
→
lib/Doctrine/
ORM/Mapping/
ClassMetadata.php
View file @
d4e554fb
...
...
@@ -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 */
/**
...
...
lib/Doctrine/
ClassMetadata/
Factory.php
→
lib/Doctrine/
ORM/Mapping/ClassMetadata
Factory.php
View file @
d4e554fb
...
...
@@ -33,7 +33,7 @@
* @since 2.0
* @todo Rename to ClassDescriptorFactory.
*/
class
Doctrine_
ClassMetadata_
Factory
class
Doctrine_
ORM_Mapping_ClassMetadata
Factory
{
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
.
"."
);
...
...
lib/Doctrine/
ClassMetadata
/CodeDriver.php
→
lib/Doctrine/
ORM/Mapping/Driver
/CodeDriver.php
View file @
d4e554fb
...
...
@@ -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"
...
...
lib/Doctrine/
ClassMetadata
/YamlDriver.php
→
lib/Doctrine/
ORM/Mapping/Driver
/YamlDriver.php
View file @
d4e554fb
...
...
@@ -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."
);
}
...
...
lib/Doctrine/
ClassMetadata
/Exception.php
→
lib/Doctrine/
ORM/Mapping
/Exception.php
View file @
d4e554fb
File moved
lib/Doctrine/ORM/Persisters/AbstractEntityPersister.php
View file @
d4e554fb
...
...
@@ -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
();
...
...
tests/Orm/Query/IdentifierRecognitionTest.php
View file @
d4e554fb
...
...
@@ -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'
]);
...
...
tests/lib/mocks/Doctrine_ClassMetadataMock.php
View file @
d4e554fb
<?php
class
Doctrine_ClassMetadataMock
extends
Doctrine_ClassMetadata
class
Doctrine_ClassMetadataMock
extends
Doctrine_
ORM_Mapping_
ClassMetadata
{
...
...
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