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
d0552225
Commit
d0552225
authored
Sep 12, 2008
by
romanb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
moved id generators
parent
43e35d3b
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
13 additions
and
13 deletions
+13
-13
ClassMetadata.php
lib/Doctrine/ClassMetadata.php
+4
-4
UnitOfWork.php
lib/Doctrine/Connection/UnitOfWork.php
+1
-1
AbstractIdGenerator.php
lib/Doctrine/ORM/Id/AbstractIdGenerator.php
+1
-1
Assigned.php
lib/Doctrine/ORM/Id/Assigned.php
+1
-1
IdentityGenerator.php
lib/Doctrine/ORM/Id/IdentityGenerator.php
+1
-1
SequenceGenerator.php
lib/Doctrine/ORM/Id/SequenceGenerator.php
+1
-1
SequenceIdentityGenerator.php
lib/Doctrine/ORM/Id/SequenceIdentityGenerator.php
+1
-1
TableGenerator.php
lib/Doctrine/ORM/Id/TableGenerator.php
+1
-1
Doctrine_ClassMetadataMock.php
tests/lib/mocks/Doctrine_ClassMetadataMock.php
+1
-1
Doctrine_SequenceMock.php
tests/lib/mocks/Doctrine_SequenceMock.php
+1
-1
No files found.
lib/Doctrine/ClassMetadata.php
View file @
d0552225
...
@@ -792,13 +792,13 @@ class Doctrine_ClassMetadata implements Doctrine_Configurable, Serializable
...
@@ -792,13 +792,13 @@ class Doctrine_ClassMetadata implements Doctrine_Configurable, Serializable
protected
function
_createIdGenerator
()
protected
function
_createIdGenerator
()
{
{
if
(
$this
->
_generatorType
==
self
::
GENERATOR_TYPE_IDENTITY
)
{
if
(
$this
->
_generatorType
==
self
::
GENERATOR_TYPE_IDENTITY
)
{
$this
->
_idGenerator
=
new
Doctrine_Id_IdentityGenerator
(
$this
->
_em
);
$this
->
_idGenerator
=
new
Doctrine_
ORM_
Id_IdentityGenerator
(
$this
->
_em
);
}
else
if
(
$this
->
_generatorType
==
self
::
GENERATOR_TYPE_SEQUENCE
)
{
}
else
if
(
$this
->
_generatorType
==
self
::
GENERATOR_TYPE_SEQUENCE
)
{
$this
->
_idGenerator
=
new
Doctrine_Id_SequenceGenerator
(
$this
->
_em
);
$this
->
_idGenerator
=
new
Doctrine_
ORM_
Id_SequenceGenerator
(
$this
->
_em
);
}
else
if
(
$this
->
_generatorType
==
self
::
GENERATOR_TYPE_TABLE
)
{
}
else
if
(
$this
->
_generatorType
==
self
::
GENERATOR_TYPE_TABLE
)
{
$this
->
_idGenerator
=
new
Doctrine_Id_TableGenerator
(
$this
->
_em
);
$this
->
_idGenerator
=
new
Doctrine_
ORM_
Id_TableGenerator
(
$this
->
_em
);
}
else
{
}
else
{
$this
->
_idGenerator
=
new
Doctrine_Id_Assigned
(
$this
->
_em
);
$this
->
_idGenerator
=
new
Doctrine_
ORM_
Id_Assigned
(
$this
->
_em
);
}
}
}
}
...
...
lib/Doctrine/Connection/UnitOfWork.php
View file @
d0552225
...
@@ -638,7 +638,7 @@ class Doctrine_Connection_UnitOfWork
...
@@ -638,7 +638,7 @@ class Doctrine_Connection_UnitOfWork
break
;
break
;
case
Doctrine_Entity
::
STATE_NEW
:
case
Doctrine_Entity
::
STATE_NEW
:
$result
=
$class
->
getIdGenerator
()
->
generate
(
$entity
);
$result
=
$class
->
getIdGenerator
()
->
generate
(
$entity
);
if
(
$result
==
Doctrine_Id_AbstractIdGenerator
::
POST_INSERT_INDICATOR
)
{
if
(
$result
==
Doctrine_
ORM_
Id_AbstractIdGenerator
::
POST_INSERT_INDICATOR
)
{
$insertNow
[
$entity
->
getOid
()]
=
$entity
;
$insertNow
[
$entity
->
getOid
()]
=
$entity
;
}
else
{
}
else
{
$entity
->
_assignIdentifier
(
$result
);
$entity
->
_assignIdentifier
(
$result
);
...
...
lib/Doctrine/Id/AbstractIdGenerator.php
→
lib/Doctrine/
ORM/
Id/AbstractIdGenerator.php
View file @
d0552225
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
* @todo Rename to AbstractIdGenerator
* @todo Rename to AbstractIdGenerator
*/
*/
abstract
class
Doctrine_Id_AbstractIdGenerator
abstract
class
Doctrine_
ORM_
Id_AbstractIdGenerator
{
{
const
POST_INSERT_INDICATOR
=
'POST_INSERT_INDICATOR'
;
const
POST_INSERT_INDICATOR
=
'POST_INSERT_INDICATOR'
;
...
...
lib/Doctrine/Id/Assigned.php
→
lib/Doctrine/
ORM/
Id/Assigned.php
View file @
d0552225
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
*
*
* @since 2.0
* @since 2.0
*/
*/
class
Doctrine_
Id_Assigned
extends
Doctrine
_Id_AbstractIdGenerator
class
Doctrine_
ORM_Id_Assigned
extends
Doctrine_ORM
_Id_AbstractIdGenerator
{
{
/**
/**
* Enter description here...
* Enter description here...
...
...
lib/Doctrine/Id/IdentityGenerator.php
→
lib/Doctrine/
ORM/
Id/IdentityGenerator.php
View file @
d0552225
<?php
<?php
class
Doctrine_
Id_IdentityGenerator
extends
Doctrine
_Id_AbstractIdGenerator
class
Doctrine_
ORM_Id_IdentityGenerator
extends
Doctrine_ORM
_Id_AbstractIdGenerator
{
{
/**
/**
* Enter description here...
* Enter description here...
...
...
lib/Doctrine/Id/SequenceGenerator.php
→
lib/Doctrine/
ORM/
Id/SequenceGenerator.php
View file @
d0552225
<?php
<?php
class
Doctrine_
Id_SequenceGenerator
extends
Doctrine
_Id_AbstractIdGenerator
class
Doctrine_
ORM_Id_SequenceGenerator
extends
Doctrine_ORM
_Id_AbstractIdGenerator
{
{
private
$_sequenceName
;
private
$_sequenceName
;
...
...
lib/Doctrine/Id/SequenceIdentityGenerator.php
→
lib/Doctrine/
ORM/
Id/SequenceIdentityGenerator.php
View file @
d0552225
<?php
<?php
class
Doctrine_
Id_SequenceIdentityGenerator
extends
Doctrine
_Id_IdentityGenerator
class
Doctrine_
ORM_Id_SequenceIdentityGenerator
extends
Doctrine_ORM
_Id_IdentityGenerator
{
{
private
$_sequenceName
;
private
$_sequenceName
;
...
...
lib/Doctrine/Id/TableGenerator.php
→
lib/Doctrine/
ORM/
Id/TableGenerator.php
View file @
d0552225
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
*
*
* @since 2.0
* @since 2.0
*/
*/
class
Doctrine_
Id_TableGenerator
extends
Doctrine
_Id_AbstractIdGenerator
class
Doctrine_
ORM_Id_TableGenerator
extends
Doctrine_ORM
_Id_AbstractIdGenerator
{
{
public
function
generate
(
Doctrine_Entity
$entity
)
public
function
generate
(
Doctrine_Entity
$entity
)
...
...
tests/lib/mocks/Doctrine_ClassMetadataMock.php
View file @
d0552225
...
@@ -6,7 +6,7 @@ class Doctrine_ClassMetadataMock extends Doctrine_ClassMetadata
...
@@ -6,7 +6,7 @@ class Doctrine_ClassMetadataMock extends Doctrine_ClassMetadata
/* Mock API */
/* Mock API */
public
function
setIdGenerator
(
Doctrine_Id_AbstractIdGenerator
$g
)
{
public
function
setIdGenerator
(
Doctrine_
ORM_
Id_AbstractIdGenerator
$g
)
{
$this
->
_idGenerator
=
$g
;
$this
->
_idGenerator
=
$g
;
}
}
...
...
tests/lib/mocks/Doctrine_SequenceMock.php
View file @
d0552225
<?php
<?php
class
Doctrine_SequenceMock
extends
Doctrine_Id_SequenceGenerator
class
Doctrine_SequenceMock
extends
Doctrine_
ORM_
Id_SequenceGenerator
{
{
private
$_sequenceNumber
=
0
;
private
$_sequenceNumber
=
0
;
...
...
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