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
270bf922
Commit
270bf922
authored
Sep 21, 2006
by
zYne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added some doc blocks
parent
3be1d002
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
118 additions
and
16 deletions
+118
-16
Chain.php
Doctrine/EventListener/Chain.php
+118
-16
No files found.
Doctrine/EventListener/Chain.php
View file @
270bf922
...
...
@@ -38,99 +38,201 @@ class Doctrine_EventListener_Chain extends Doctrine_Access {
public
function
set
(
$key
,
Doctrine_EventListener
$listener
)
{
$this
->
listeners
[
$key
]
=
$listener
;
}
/**
* onLoad
* an event invoked when Doctrine_Record is being loaded from database
*
* @param Doctrine_Record $record
* @return void
*/
public
function
onLoad
(
Doctrine_Record
$record
)
{
foreach
(
$this
->
listeners
as
$listener
)
{
$listener
->
onLoad
(
$record
);
}
}
/**
* onPreLoad
* an event invoked when Doctrine_Record is being loaded
* from database but not yet initialized
*
* @param Doctrine_Record $record
* @return void
*/
public
function
onPreLoad
(
Doctrine_Record
$record
)
{
foreach
(
$this
->
listeners
as
$listener
)
{
$listener
->
onPreLoad
(
$record
);
}
}
/**
* onSleep
* an event invoked when Doctrine_Record is serialized
*
* @param Doctrine_Record $record
* @return void
*/
public
function
onSleep
(
Doctrine_Record
$record
)
{
foreach
(
$this
->
listeners
as
$listener
)
{
$listener
->
onSleep
(
$record
);
}
}
/**
* onWakeUp
* an event invoked when Doctrine_Record is unserialized
*
* @param Doctrine_Record $record
* @return void
*/
public
function
onWakeUp
(
Doctrine_Record
$record
)
{
foreach
(
$this
->
listeners
as
$listener
)
{
$listener
->
onWakeUp
(
$record
);
}
}
/**
* onUpdate
* an event invoked after Doctrine_Record is updated
*
* @param Doctrine_Record $record
* @return void
*/
public
function
onUpdate
(
Doctrine_Record
$record
)
{
foreach
(
$this
->
listeners
as
$listener
)
{
$listener
->
onUpdate
(
$record
);
}
}
/**
* onPreUpdate
* an event invoked before Doctrine_Record is updated
*
* @param Doctrine_Record $record
* @return void
*/
public
function
onPreUpdate
(
Doctrine_Record
$record
)
{
foreach
(
$this
->
listeners
as
$listener
)
{
$listener
->
onPreUpdate
(
$record
);
}
}
/**
* onCreate
* an event invoked when a new Doctrine_Record is created
*
* @param Doctrine_Record $record
* @return void
*/
public
function
onCreate
(
Doctrine_Record
$record
)
{
foreach
(
$this
->
listeners
as
$listener
)
{
$listener
->
onCreate
(
$record
);
}
}
/**
* onPreCreate
* an event invoked when a new Doctrine_Record
* but not yet initialized
*
* @param Doctrine_Record $record
* @return void
*/
public
function
onPreCreate
(
Doctrine_Record
$record
)
{
foreach
(
$this
->
listeners
as
$listener
)
{
$listener
->
onPreCreate
(
$record
);
}
}
/**
* onSave
* an event invoked after a Doctrine_Record is saved (inserted / updated)
*
* @param Doctrine_Record $record
* @return void
*/
public
function
onSave
(
Doctrine_Record
$record
)
{
foreach
(
$this
->
listeners
as
$listener
)
{
$listener
->
onSave
(
$record
);
}
}
/**
* onSave
* an event invoked after a Doctrine_Record is saved (inserted / updated)
*
* @param Doctrine_Record $record
* @return void
*/
public
function
onPreSave
(
Doctrine_Record
$record
)
{
foreach
(
$this
->
listeners
as
$listener
)
{
$listener
->
onPreSave
(
$record
);
}
}
/**
* onGetProperty
* an event invoked when a property of Doctrine_Record is retrieved
*
* @param Doctrine_Record $record
* @param string $property
* @param mixed $value
* @return void
*/
public
function
onGetProperty
(
Doctrine_Record
$record
,
$property
,
$value
)
{
foreach
(
$this
->
listeners
as
$listener
)
{
$value
=
$listener
->
onGetProperty
(
$record
,
$property
,
$value
);
}
return
$value
;
}
/**
* onSetProperty
* an event invoked when a property of Doctrine_Record is being set
*
* @param Doctrine_Record $record
* @param string $property
* @param mixed $value
* @return void
*/
public
function
onSetProperty
(
Doctrine_Record
$record
,
$property
,
$value
)
{
foreach
(
$this
->
listeners
as
$listener
)
{
$value
=
$listener
->
onSetProperty
(
$record
,
$property
,
$value
);
}
return
$value
;
}
/**
* onInsert
* an event invoked after Doctrine_Record is inserted into database
*
* @param Doctrine_Record $record
* @return void
*/
public
function
onInsert
(
Doctrine_Record
$record
)
{
foreach
(
$this
->
listeners
as
$listener
)
{
$listener
->
onInsert
(
$record
);
}
}
/**
* onPreInsert
* an event invoked before Doctrine_Record is inserted into database
*
* @param Doctrine_Record $record
* @return void
*/
public
function
onPreInsert
(
Doctrine_Record
$record
)
{
foreach
(
$this
->
listeners
as
$listener
)
{
$listener
->
onPreInsert
(
$record
);
}
}
/**
* onDelete
* an event invoked after Doctrine_Record is deleted from database
*
* @param Doctrine_Record $record
* @return void
*/
public
function
onDelete
(
Doctrine_Record
$record
)
{
foreach
(
$this
->
listeners
as
$listener
)
{
$listener
->
onDelete
(
$record
);
}
}
/**
* onPreDelete
* an event invoked before Doctrine_Record is deleted from database
*
* @param Doctrine_Record $record
* @return void
*/
public
function
onPreDelete
(
Doctrine_Record
$record
)
{
foreach
(
$this
->
listeners
as
$listener
)
{
$listener
->
onPreDelete
(
$record
);
...
...
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