class Doctrine_Event (View source)

Doctrine_Event

Constants

CONN_QUERY

CONNECTION EVENT CODES

CONN_EXEC

CONN_PREPARE

CONN_CONNECT

CONN_CLOSE

CONN_ERROR

STMT_EXECUTE

STMT_FETCH

STMT_FETCHALL

TX_BEGIN

TX_COMMIT

TX_ROLLBACK

SAVEPOINT_CREATE

SAVEPOINT_ROLLBACK

SAVEPOINT_COMMIT

HYDRATE

RECORD_DELETE

RECORD_SAVE

RECORD_UPDATE

RECORD_INSERT

RECORD_SERIALIZE

RECORD_UNSERIALIZE

RECORD_DQL_DELETE

RECORD_DQL_SELECT

RECORD_DQL_UPDATE

RECORD_VALIDATE

Properties

static protected mixed $_nextSequence
protected mixed $_sequence
protected mixed $_invoker
protected string $_query
protected string $_params
protected integer $_code
protected integer $_startedMicrotime
protected integer $_endedMicrotime
protected array $_options

Methods

__construct($invoker, $code, $query = null, $params = array())

constructor

string
getName()

getName returns the name of this event

integer
getCode()

getCode

mixed
__get(string $option)

getOption returns the value of an option

skipOperation()

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

__set(string $option, mixed $value)

setOption sets the value of an option

set(string $option, mixed $value)

setOption sets the value of an option by reference

start()

start starts the internal timer of this event

boolean
hasEnded()

hasEnded whether or not this event has ended

end()

end ends the internal timer of this event

integer
getSequence()

getSequence returns the sequence of this event

getInvoker()

getInvoker returns the handler that invoked this event

void
setInvoker(mixed $invoker)

setInvoker Defines new invoker (used in Hydrator)

array
getParams()

getParams returns the parameters of the query

integer
getElapsedSecs()

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

Details

__construct($invoker, $code, $query = null, $params = array())

constructor

Parameters

$invoker
$code
$query
$params

Doctrine_Query getQuery()

getQuery

Return Value

Doctrine_Query returns the query associated with this event (if any)

string getName()

getName returns the name of this event

Return Value

string the name of this event

integer getCode()

getCode

Return Value

integer returns the code associated with this event

mixed __get(string $option)

getOption returns the value of an option

Parameters

string $option the name of the option

Return Value

mixed

Doctrine_Event skipOperation()

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

Return Value

Doctrine_Event this object

Doctrine_Event __set(string $option, mixed $value)

setOption sets the value of an option

Parameters

string $option the name of the option
mixed $value the value of the given option

Return Value

Doctrine_Event this object

Doctrine_Event set(string $option, mixed $value)

setOption sets the value of an option by reference

Parameters

string $option the name of the option
mixed $value the value of the given option

Return Value

Doctrine_Event this object

Doctrine_Event start()

start starts the internal timer of this event

Return Value

Doctrine_Event this object

boolean hasEnded()

hasEnded whether or not this event has ended

Return Value

boolean

Doctrine_Event end()

end ends the internal timer of this event

Return Value

Doctrine_Event this object

integer getSequence()

getSequence returns the sequence of this event

Return Value

integer

Doctrine_Connection|Doctrine_Connection_Statement getInvoker()

getInvoker returns the handler that invoked this event

Return Value

Doctrine_Connection|Doctrine_Connection_Statement Doctrine_Connection_UnitOfWork|Doctrine_Transaction the handler that invoked this event

void setInvoker(mixed $invoker)

setInvoker Defines new invoker (used in Hydrator)

Parameters

mixed $invoker

Return Value

void

array getParams()

getParams returns the parameters of the query

Return Value

array parameters of the query

integer getElapsedSecs()

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

Return Value

integer