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
b17ad38e
Commit
b17ad38e
authored
Aug 26, 2009
by
jwage
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[2.0] Renaming LifecycleListener annotation to HasLifecycleCallbacks
parent
c3081adb
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
7 deletions
+5
-7
AnnotationDriver.php
lib/Doctrine/ORM/Mapping/Driver/AnnotationDriver.php
+2
-3
DoctrineAnnotations.php
lib/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php
+1
-1
LifecycleCallbackTest.php
...s/Doctrine/Tests/ORM/Functional/LifecycleCallbackTest.php
+2
-3
No files found.
lib/Doctrine/ORM/Mapping/Driver/AnnotationDriver.php
View file @
b17ad38e
...
@@ -244,9 +244,8 @@ class AnnotationDriver implements Driver
...
@@ -244,9 +244,8 @@ class AnnotationDriver implements Driver
}
}
}
}
// Evaluate LifecycleListener annotation
// Evaluate HasLifecycleCallbacks annotation
if
(
isset
(
$classAnnotations
[
'Doctrine\ORM\Mapping\LifecycleListener'
]))
{
if
(
isset
(
$classAnnotations
[
'Doctrine\ORM\Mapping\HasLifecycleCallbacks'
]))
{
$lifecycleListenerAnnot
=
$classAnnotations
[
'Doctrine\ORM\Mapping\LifecycleListener'
];
foreach
(
$class
->
getMethods
()
as
$method
)
{
foreach
(
$class
->
getMethods
()
as
$method
)
{
if
(
$method
->
isPublic
())
{
if
(
$method
->
isPublic
())
{
$annotations
=
$this
->
_reader
->
getMethodAnnotations
(
$method
);
$annotations
=
$this
->
_reader
->
getMethodAnnotations
(
$method
);
...
...
lib/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php
View file @
b17ad38e
...
@@ -119,7 +119,7 @@ final class SequenceGenerator extends Annotation {
...
@@ -119,7 +119,7 @@ final class SequenceGenerator extends Annotation {
final
class
ChangeTrackingPolicy
extends
Annotation
{}
final
class
ChangeTrackingPolicy
extends
Annotation
{}
/* Annotations for lifecycle callbacks */
/* Annotations for lifecycle callbacks */
final
class
LifecycleListener
extends
Annotation
{}
final
class
HasLifecycleCallbacks
extends
Annotation
{}
final
class
PrePersist
extends
Annotation
{}
final
class
PrePersist
extends
Annotation
{}
final
class
PostPersist
extends
Annotation
{}
final
class
PostPersist
extends
Annotation
{}
final
class
PreUpdate
extends
Annotation
{}
final
class
PreUpdate
extends
Annotation
{}
...
...
tests/Doctrine/Tests/ORM/Functional/LifecycleCallbackTest.php
View file @
b17ad38e
...
@@ -43,7 +43,7 @@ class LifecycleCallbackTest extends \Doctrine\Tests\OrmFunctionalTestCase
...
@@ -43,7 +43,7 @@ class LifecycleCallbackTest extends \Doctrine\Tests\OrmFunctionalTestCase
/**
/**
* @Entity
* @Entity
* @
LifecycleListener
* @
HasLifecycleCallbacks
* @Table(name="lifecycle_callback_test_entity")
* @Table(name="lifecycle_callback_test_entity")
*/
*/
class
LifecycleCallbackTestEntity
class
LifecycleCallbackTestEntity
...
@@ -83,4 +83,3 @@ class LifecycleCallbackTestEntity
...
@@ -83,4 +83,3 @@ class LifecycleCallbackTestEntity
$this
->
value
=
'changed from preUpdate callback!'
;
$this
->
value
=
'changed from preUpdate callback!'
;
}
}
}
}
\ No newline at end of file
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