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
0d5b4493
Commit
0d5b4493
authored
Jun 24, 2007
by
zYne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
formatting fix
parent
ee07246d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
26 deletions
+30
-26
Event.php
lib/Doctrine/Event.php
+30
-26
No files found.
lib/Doctrine/Event.php
View file @
0d5b4493
...
@@ -50,30 +50,34 @@ class Doctrine_Event
...
@@ -50,30 +50,34 @@ class Doctrine_Event
const
UPDATE
=
13
;
const
UPDATE
=
13
;
const
INSERT
=
14
;
const
INSERT
=
14
;
/**
/**
* @var mixed $
invoker
the handler which invoked this event
* @var mixed $
_invoker
the handler which invoked this event
*/
*/
protected
$invoker
;
protected
$
_
invoker
;
/**
/**
* @var string $
query
the sql query associated with this event (if any)
* @var string $
_query
the sql query associated with this event (if any)
*/
*/
protected
$query
;
protected
$
_
query
;
/**
/**
* @var string $
params
the parameters associated with the query (if any)
* @var string $
_params
the parameters associated with the query (if any)
*/
*/
protected
$params
;
protected
$
_
params
;
/**
/**
* @see Doctrine_Event constants
* @see Doctrine_Event constants
* @var integer $
code
the event code
* @var integer $
_code
the event code
*/
*/
protected
$code
;
protected
$
_
code
;
/**
/**
* @var integer $
startedMicrotime
the time point in which this event was started
* @var integer $
_startedMicrotime
the time point in which this event was started
*/
*/
protected
$startedMicrotime
;
protected
$
_
startedMicrotime
;
/**
/**
* @var integer $
endedMicrotime
the time point in which this event was ended
* @var integer $
_endedMicrotime
the time point in which this event was ended
*/
*/
protected
$endedMicrotime
;
protected
$_endedMicrotime
;
/**
* @var boolean $skipOperation
*/
protected
$_skipOperation
=
false
;
/**
/**
* constructor
* constructor
*
*
...
@@ -83,10 +87,10 @@ class Doctrine_Event
...
@@ -83,10 +87,10 @@ class Doctrine_Event
*/
*/
public
function
__construct
(
$invoker
,
$code
,
$query
=
null
,
$params
=
array
())
public
function
__construct
(
$invoker
,
$code
,
$query
=
null
,
$params
=
array
())
{
{
$this
->
invoker
=
$invoker
;
$this
->
_
invoker
=
$invoker
;
$this
->
code
=
$code
;
$this
->
_
code
=
$code
;
$this
->
query
=
$query
;
$this
->
_
query
=
$query
;
$this
->
params
=
$params
;
$this
->
_
params
=
$params
;
}
}
/**
/**
* getQuery
* getQuery
...
@@ -95,7 +99,7 @@ class Doctrine_Event
...
@@ -95,7 +99,7 @@ class Doctrine_Event
*/
*/
public
function
getQuery
()
public
function
getQuery
()
{
{
return
$this
->
query
;
return
$this
->
_
query
;
}
}
/**
/**
* getName
* getName
...
@@ -105,7 +109,7 @@ class Doctrine_Event
...
@@ -105,7 +109,7 @@ class Doctrine_Event
*/
*/
public
function
getName
()
public
function
getName
()
{
{
switch
(
$this
->
code
)
{
switch
(
$this
->
_
code
)
{
case
self
::
QUERY
:
case
self
::
QUERY
:
return
'query'
;
return
'query'
;
case
self
::
EXEC
:
case
self
::
EXEC
:
...
@@ -131,7 +135,7 @@ class Doctrine_Event
...
@@ -131,7 +135,7 @@ class Doctrine_Event
*/
*/
public
function
getCode
()
public
function
getCode
()
{
{
return
$this
->
code
;
return
$this
->
_
code
;
}
}
/**
/**
* start
* start
...
@@ -141,7 +145,7 @@ class Doctrine_Event
...
@@ -141,7 +145,7 @@ class Doctrine_Event
*/
*/
public
function
start
()
public
function
start
()
{
{
$this
->
startedMicrotime
=
microtime
(
true
);
$this
->
_
startedMicrotime
=
microtime
(
true
);
}
}
/**
/**
* hasEnded
* hasEnded
...
@@ -151,7 +155,7 @@ class Doctrine_Event
...
@@ -151,7 +155,7 @@ class Doctrine_Event
*/
*/
public
function
hasEnded
()
public
function
hasEnded
()
{
{
return
(
$this
->
endedMicrotime
!=
null
);
return
(
$this
->
_
endedMicrotime
!=
null
);
}
}
/**
/**
* end
* end
...
@@ -161,7 +165,7 @@ class Doctrine_Event
...
@@ -161,7 +165,7 @@ class Doctrine_Event
*/
*/
public
function
end
()
public
function
end
()
{
{
$this
->
endedMicrotime
=
microtime
(
true
);
$this
->
_
endedMicrotime
=
microtime
(
true
);
}
}
/**
/**
* getInvoker
* getInvoker
...
@@ -171,7 +175,7 @@ class Doctrine_Event
...
@@ -171,7 +175,7 @@ class Doctrine_Event
*/
*/
public
function
getInvoker
()
public
function
getInvoker
()
{
{
return
$this
->
invoker
;
return
$this
->
_
invoker
;
}
}
/**
/**
* getParams
* getParams
...
@@ -181,7 +185,7 @@ class Doctrine_Event
...
@@ -181,7 +185,7 @@ class Doctrine_Event
*/
*/
public
function
getParams
()
public
function
getParams
()
{
{
return
$this
->
params
;
return
$this
->
_
params
;
}
}
/**
/**
* Get the elapsed time (in microseconds) that the event ran. If the event has
* Get the elapsed time (in microseconds) that the event ran. If the event has
...
@@ -191,9 +195,9 @@ class Doctrine_Event
...
@@ -191,9 +195,9 @@ class Doctrine_Event
*/
*/
public
function
getElapsedSecs
()
public
function
getElapsedSecs
()
{
{
if
(
is_null
(
$this
->
endedMicrotime
))
{
if
(
is_null
(
$this
->
_
endedMicrotime
))
{
return
false
;
return
false
;
}
}
return
(
$this
->
endedMicrotime
-
$this
->
startedMicrotime
);
return
(
$this
->
_endedMicrotime
-
$this
->
_
startedMicrotime
);
}
}
}
}
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