Doctrine


Doctrine\Doctrine_Event
/Doctrine/Event.php at line 33

Class Doctrine_Event

Doctrine_Event

public class Doctrine_Event

Doctrine_Event

Author:
Konsta Vesterinen
License:
http://www.opensource.org/licenses/lgpl-license.php LGPL
Package:
Doctrine
Subpackage:
Event
See Also:
www.doctrine-project.org
Since:
1.0
Version:
$Revision$

Field Summary
final int

CONN_CLOSE

final int

CONN_CONNECT

final int

CONN_ERROR

final int

CONN_EXEC

final int

CONN_PREPARE

final int

CONN_QUERY

CONNECTION EVENT CODES.

final int

HYDRATE

final int

RECORD_DELETE

final int

RECORD_DQL_DELETE

final int

RECORD_DQL_SELECT

final int

RECORD_DQL_UPDATE

final int

RECORD_INSERT

final int

RECORD_SAVE

final int

RECORD_SERIALIZE

final int

RECORD_UNSERIALIZE

final int

RECORD_UPDATE

final int

RECORD_VALIDATE

final int

SAVEPOINT_COMMIT

final int

SAVEPOINT_CREATE

final int

SAVEPOINT_ROLLBACK

final int

STMT_EXECUTE

final int

STMT_FETCH

final int

STMT_FETCHALL

final int

TX_BEGIN

final int

TX_COMMIT

final int

TX_ROLLBACK

protected integer $_code the event code

$_code

.

protected integer $_endedMicrotime the time point in which this event was ended

$_endedMicrotime

.

protected mixed $_invoker the handler which invoked this event

$_invoker

.

protected static mixed $_nextSequence the sequence of the next event that will be created

$_nextSequence

.

protected array $_options an array of options

$_options

.

protected string $_params the parameters associated with the query (if any)

$_params

.

protected string $_query the sql query associated with this event (if any)

$_query

.

protected mixed $_sequence the sequence of this event

$_sequence

.

protected integer $_startedMicrotime the time point in which this event was started

$_startedMicrotime

.

Constructor Summary

Doctrine_Event(mixed invoker, integer code, string query, mixed params, Doctrine_Connection|Doctrine_Connection_Statement| Doctrine_Connection_UnitOfWork|Doctrine_Transaction)

constructor.

Method Summary
Doctrine_Event

end()

end ends the internal timer of this event.

integer

getCode()

getCode.

integer

getElapsedSecs()

Get the elapsed time (in microseconds) that the event ran.

Doctrine_Connection|Doctrine_Connection_Statement|

getInvoker()

getInvoker returns the handler that invoked this event.

string

getName()

getName returns the name of this event.

array

getParams()

getParams returns the parameters of the query.

Doctrine_Query

getQuery()

getQuery.

integer

getSequence()

getSequence returns the sequence of this event.

boolean

hasEnded()

hasEnded whether or not this event has ended.

Doctrine_Event

set(string option, mixed value)

setOption sets the value of an option by reference.

void

setInvoker(mixed invoker)

setInvoker Defines new invoker (used in Hydrator).

Doctrine_Event

skipOperation()

skipOperation skips the next operation an alias for __set('skipOperation', true).

Doctrine_Event

start()

start starts the internal timer of this event.

Field Detail

/Doctrine/Event.php at line 42

CONN_CLOSE

public final int CONN_CLOSE = 5

/Doctrine/Event.php at line 41

CONN_CONNECT

public final int CONN_CONNECT = 4

/Doctrine/Event.php at line 43

CONN_ERROR

public final int CONN_ERROR = 6

/Doctrine/Event.php at line 39

CONN_EXEC

public final int CONN_EXEC = 2

/Doctrine/Event.php at line 40

CONN_PREPARE

public final int CONN_PREPARE = 3

/Doctrine/Event.php at line 38

CONN_QUERY

public final int CONN_QUERY = 1

CONNECTION EVENT CODES


/Doctrine/Event.php at line 56

HYDRATE

public final int HYDRATE = 40

/Doctrine/Event.php at line 61

RECORD_DELETE

public final int RECORD_DELETE = 21

/Doctrine/Event.php at line 67

RECORD_DQL_DELETE

public final int RECORD_DQL_DELETE = 27

/Doctrine/Event.php at line 68

RECORD_DQL_SELECT

public final int RECORD_DQL_SELECT = 28

/Doctrine/Event.php at line 69

RECORD_DQL_UPDATE

public final int RECORD_DQL_UPDATE = 29

/Doctrine/Event.php at line 64

RECORD_INSERT

public final int RECORD_INSERT = 24

/Doctrine/Event.php at line 62

RECORD_SAVE

public final int RECORD_SAVE = 22

/Doctrine/Event.php at line 65

RECORD_SERIALIZE

public final int RECORD_SERIALIZE = 25

/Doctrine/Event.php at line 66

RECORD_UNSERIALIZE

public final int RECORD_UNSERIALIZE = 26

/Doctrine/Event.php at line 63

RECORD_UPDATE

public final int RECORD_UPDATE = 23

/Doctrine/Event.php at line 70

RECORD_VALIDATE

public final int RECORD_VALIDATE = 30

/Doctrine/Event.php at line 54

SAVEPOINT_COMMIT

public final int SAVEPOINT_COMMIT = 36

/Doctrine/Event.php at line 52

SAVEPOINT_CREATE

public final int SAVEPOINT_CREATE = 34

/Doctrine/Event.php at line 53

SAVEPOINT_ROLLBACK

public final int SAVEPOINT_ROLLBACK = 35

/Doctrine/Event.php at line 45

STMT_EXECUTE

public final int STMT_EXECUTE = 10

/Doctrine/Event.php at line 46

STMT_FETCH

public final int STMT_FETCH = 11

/Doctrine/Event.php at line 47

STMT_FETCHALL

public final int STMT_FETCHALL = 12

/Doctrine/Event.php at line 49

TX_BEGIN

public final int TX_BEGIN = 31

/Doctrine/Event.php at line 50

TX_COMMIT

public final int TX_COMMIT = 32

/Doctrine/Event.php at line 51

TX_ROLLBACK

public final int TX_ROLLBACK = 33

/Doctrine/Event.php at line 101

_code

protected integer $_code the event code $_code

See Also:
constants

/Doctrine/Event.php at line 111

_endedMicrotime

protected integer $_endedMicrotime the time point in which this event was ended $_endedMicrotime


/Doctrine/Event.php at line 85

_invoker

protected mixed $_invoker the handler which invoked this event $_invoker


/Doctrine/Event.php at line 75

_nextSequence

protected static mixed $_nextSequence the sequence of the next event that will be created $_nextSequence


/Doctrine/Event.php at line 116

_options

protected array $_options an array of options $_options = array()


/Doctrine/Event.php at line 95

_params

protected string $_params the parameters associated with the query (if any) $_params


/Doctrine/Event.php at line 90

_query

protected string $_query the sql query associated with this event (if any) $_query


/Doctrine/Event.php at line 80

_sequence

protected mixed $_sequence the sequence of this event $_sequence


/Doctrine/Event.php at line 106

_startedMicrotime

protected integer $_startedMicrotime the time point in which this event was started $_startedMicrotime


Constructor Detail

/Doctrine/Event.php at line 126

Doctrine_Event

public Doctrine_Event(mixed invoker, integer code, string query, mixed params, Doctrine_Connection|Doctrine_Connection_Statement| Doctrine_Connection_UnitOfWork|Doctrine_Transaction)

constructor

Parameters:
Doctrine_Connection_UnitOfWork|Doctrine_Transaction - $invoker the handler which invoked this event
code - the event code
query - the sql query associated with this event (if any)

Method Detail

/Doctrine/Event.php at line 309

end

public Doctrine_Event end()

end ends the internal timer of this event

Returns:
this object

/Doctrine/Event.php at line 216

getCode

public integer getCode()

getCode

Returns:
returns the code associated with this event

/Doctrine/Event.php at line 368

getElapsedSecs

public integer getElapsedSecs()

Get the elapsed time (in microseconds) that the event ran. If the event has not yet ended, return false.


/Doctrine/Event.php at line 334

getInvoker

public Doctrine_Connection|Doctrine_Connection_Statement| getInvoker()

getInvoker returns the handler that invoked this event

Returns:
Doctrine_Connection_UnitOfWork|Doctrine_Transaction the handler that invoked this event

/Doctrine/Event.php at line 151

getName

public string getName()

getName returns the name of this event

Returns:
the name of this event

/Doctrine/Event.php at line 357

getParams

public array getParams()

getParams returns the parameters of the query

Returns:
parameters of the query

/Doctrine/Event.php at line 140

getQuery

public Doctrine_Query getQuery()

getQuery

Returns:
returns the query associated with this event (if any)

/Doctrine/Event.php at line 322

getSequence

public integer getSequence()

getSequence returns the sequence of this event


/Doctrine/Event.php at line 298

hasEnded

public boolean hasEnded()

hasEnded whether or not this event has ended


/Doctrine/Event.php at line 274

set

public Doctrine_Event set(string option, mixed value)

setOption sets the value of an option by reference

Parameters:
option - the name of the option
value - the value of the given option
Returns:
this object

/Doctrine/Event.php at line 346

setInvoker

public void setInvoker(mixed invoker)

setInvoker Defines new invoker (used in Hydrator)


/Doctrine/Event.php at line 244

skipOperation

public Doctrine_Event skipOperation()

skipOperation skips the next operation an alias for __set('skipOperation', true)

Returns:
this object

/Doctrine/Event.php at line 287

start

public Doctrine_Event start()

start starts the internal timer of this event

Returns:
this object

Doctrine