class Doctrine_Template_Listener_Timestampable extends Doctrine_Record_Listener (View source)

Listener for the Timestampable behavior which automatically sets the created and updated columns when a record is inserted and updated.

Properties

protected string $_options Array of timestampable options

Methods

setOption($name, $value = null)

setOption sets an option in order to allow flexible listener

getOptions()

getOptions returns all options of this template and the associated values

getOption($name)

getOption returns the value of given option

preSave(Doctrine_Event $event)

No description

postSave(Doctrine_Event $event)

No description

preDelete(Doctrine_Event $event)

No description

postDelete(Doctrine_Event $event)

No description

preDqlUpdate(Doctrine_Event $event)

Set the updated field for dql update queries

preUpdate(Doctrine_Event $event)

Set updated Timestampable column when a record is updated

postUpdate(Doctrine_Event $event)

No description

preInsert(Doctrine_Event $event)

Set the created and updated Timestampable columns when a record is inserted

postInsert(Doctrine_Event $event)

No description

preHydrate(Doctrine_Event $event)

No description

postHydrate(Doctrine_Event $event)

No description

preValidate(Doctrine_Event $event)

No description

void
__construct(array $options)

__construct

void
getTimestamp($type, $conn = null)

Gets the timestamp in the correct format based on the way the behavior is configured

Details

setOption($name, $value = null)

setOption sets an option in order to allow flexible listener

Parameters

$name
$value

getOptions()

getOptions returns all options of this template and the associated values

getOption($name)

getOption returns the value of given option

Parameters

$name

preSerialize(Doctrine_Event $event)

Parameters

Doctrine_Event $event

postSerialize(Doctrine_Event $event)

Parameters

Doctrine_Event $event

preUnserialize(Doctrine_Event $event)

Parameters

Doctrine_Event $event

postUnserialize(Doctrine_Event $event)

Parameters

Doctrine_Event $event

preDqlSelect(Doctrine_Event $event)

Parameters

Doctrine_Event $event

preSave(Doctrine_Event $event)

Parameters

Doctrine_Event $event

postSave(Doctrine_Event $event)

Parameters

Doctrine_Event $event

preDqlDelete(Doctrine_Event $event)

Parameters

Doctrine_Event $event

preDelete(Doctrine_Event $event)

Parameters

Doctrine_Event $event

postDelete(Doctrine_Event $event)

Parameters

Doctrine_Event $event

preDqlUpdate(Doctrine_Event $event)

Set the updated field for dql update queries

Parameters

Doctrine_Event $event

preUpdate(Doctrine_Event $event)

Set updated Timestampable column when a record is updated

Parameters

Doctrine_Event $event

postUpdate(Doctrine_Event $event)

Parameters

Doctrine_Event $event

preInsert(Doctrine_Event $event)

Set the created and updated Timestampable columns when a record is inserted

Parameters

Doctrine_Event $event

postInsert(Doctrine_Event $event)

Parameters

Doctrine_Event $event

preHydrate(Doctrine_Event $event)

Parameters

Doctrine_Event $event

postHydrate(Doctrine_Event $event)

Parameters

Doctrine_Event $event

preValidate(Doctrine_Event $event)

Parameters

Doctrine_Event $event

postValidate(Doctrine_Event $event)

Parameters

Doctrine_Event $event

void __construct(array $options)

__construct

Parameters

array $options

Return Value

void

void getTimestamp($type, $conn = null)

Gets the timestamp in the correct format based on the way the behavior is configured

Parameters

$type
$conn

Return Value

void