class Doctrine_EventListener_Chain extends Doctrine_Access implements Doctrine_EventListener_Interface (View source)

Doctrine_EventListener_Chain this class represents a chain of different listeners, useful for having multiple listeners listening the events at the same time

Properties

protected Doctrine_Locator $_locator from Doctrine_Locator_Injectable
protected array $_resources from Doctrine_Locator_Injectable
static protected Doctrine_Null $_null from Doctrine_Locator_Injectable
protected array $_listeners

Methods

setLocator(Doctrine_Locator $locator)

setLocator this method can be used for setting the locator object locally

getLocator()

getLocator returns the locator associated with this object

mixed
locate(string $name)

locate locates a resource by given name and returns it

bind($name, $resource)

bind binds a resource to a name

static void
initNullObject(Doctrine_Null $null)

initNullObject initializes the null object

static Doctrine_Null
getNullObject()

getNullObject returns the null object associated with this object

setArray(array $array)

Set an entire aray to the data

void
__set($name, $value)

Set key and value to data

mixed
__get(mixed $name)

Get key from data

boolean
__isset(string $name)

Check if key exists in data

void
__unset(string $name)

Remove key from data

boolean
offsetExists(mixed $offset)

Check if an offset axists

mixed
offsetGet(mixed $offset)

An alias of get()

void
offsetSet(mixed $offset, mixed $value)

Sets $offset to $value

offsetUnset(mixed $offset)

Unset a given offset

boolean
remove(mixed $offset)

Remove the element with the specified offset

mixed
get(mixed $key)

returns a Doctrine_EventListener on success and null on failure

set(mixed $key, Doctrine_EventListener $listener)

set

boolean
contains(mixed $offset)

Check if the specified offset exists

void
add(object $listener, string $name = null)

add adds a listener to the chain of listeners

void
onLoad(Doctrine_Record $record)

onLoad an event invoked when Doctrine_Record is being loaded from database

void
onPreLoad(Doctrine_Record $record)

onPreLoad an event invoked when Doctrine_Record is being loaded from database but not yet initialized

void
onSleep(Doctrine_Record $record)

onSleep an event invoked when Doctrine_Record is serialized

void
onWakeUp(Doctrine_Record $record)

onWakeUp an event invoked when Doctrine_Record is unserialized

void
postClose(Doctrine_Event $event)

postClose an event invoked after Doctrine_Connection is closed

void
preClose(Doctrine_Event $event)

preClose an event invoked before Doctrine_Connection is closed

void
onOpen(Doctrine_Connection $connection)

onOpen an event invoked after Doctrine_Connection is opened

postTransactionCommit(Doctrine_Event $event)

onTransactionCommit an event invoked after a Doctrine_Connection transaction is committed

preTransactionCommit(Doctrine_Event $event)

onPreTransactionCommit an event invoked before a Doctrine_Connection transaction is committed

postTransactionRollback(Doctrine_Event $event)

onTransactionRollback an event invoked after a Doctrine_Connection transaction is being rolled back

preTransactionRollback(Doctrine_Event $event)

onPreTransactionRollback an event invoked before a Doctrine_Connection transaction is being rolled back

postTransactionBegin(Doctrine_Event $event)

onTransactionBegin an event invoked after a Doctrine_Connection transaction has been started

preTransactionBegin(Doctrine_Event $event)

onTransactionBegin an event invoked before a Doctrine_Connection transaction is being started

void
postSavepointCommit(Doctrine_Event $event)

postSavepointCommit an event invoked after a Doctrine_Connection transaction with savepoint is committed

void
preSavepointCommit(Doctrine_Event $event)

preSavepointCommit an event invoked before a Doctrine_Connection transaction with savepoint is committed

void
postSavepointRollback(Doctrine_Event $event)

postSavepointRollback an event invoked after a Doctrine_Connection transaction with savepoint is being rolled back

void
preSavepointRollback(Doctrine_Event $event)

preSavepointRollback an event invoked before a Doctrine_Connection transaction with savepoint is being rolled back

void
postSavepointCreate(Doctrine_Event $event)

postSavepointCreate an event invoked after a Doctrine_Connection transaction with savepoint has been started

void
preSavepointCreate(Doctrine_Event $event)

preSavepointCreate an event invoked before a Doctrine_Connection transaction with savepoint is being started

void
onCollectionDelete(Doctrine_Collection $collection)

onCollectionDelete an event invoked after a Doctrine_Collection is being deleted

void
onPreCollectionDelete(Doctrine_Collection $collection)

onCollectionDelete an event invoked after a Doctrine_Collection is being deleted

postConnect(Doctrine_Event $event)

No description

preConnect(Doctrine_Event $event)

No description

preQuery(Doctrine_Event $event)

No description

postQuery(Doctrine_Event $event)

No description

prePrepare(Doctrine_Event $event)

No description

postPrepare(Doctrine_Event $event)

No description

preExec(Doctrine_Event $event)

No description

postExec(Doctrine_Event $event)

No description

preError(Doctrine_Event $event)

No description

postError(Doctrine_Event $event)

No description

preFetch(Doctrine_Event $event)

No description

postFetch(Doctrine_Event $event)

No description

preFetchAll(Doctrine_Event $event)

No description

postFetchAll(Doctrine_Event $event)

No description

preStmtExecute(Doctrine_Event $event)

No description

postStmtExecute(Doctrine_Event $event)

No description

Details

Doctrine_Locator_Injectable setLocator(Doctrine_Locator $locator)

setLocator this method can be used for setting the locator object locally

Parameters

Doctrine_Locator $locator the locator object

Return Value

Doctrine_Locator_Injectable this instance

Doctrine_Locator getLocator()

getLocator returns the locator associated with this object

if there are no locator locally associated then this method tries to fetch the current global locator

Return Value

Doctrine_Locator

mixed locate(string $name)

locate locates a resource by given name and returns it

if the resource cannot be found locally this method tries to use the global locator for finding the resource

Parameters

string $name the name of the resource

Return Value

mixed the located resource

Exceptions

Doctrine_Locator_Exception if the resource could not be found

See also

Doctrine_Locator::locate

Doctrine_Locator bind($name, $resource)

bind binds a resource to a name

Parameters

$name
$resource

Return Value

Doctrine_Locator this object

static void initNullObject(Doctrine_Null $null)

initNullObject initializes the null object

Parameters

Doctrine_Null $null

Return Value

void

static Doctrine_Null getNullObject()

getNullObject returns the null object associated with this object

Return Value

Doctrine_Null

Doctrine_Access setArray(array $array)

Set an entire aray to the data

Parameters

array $array An array of key => value pairs

Return Value

Doctrine_Access

void __set($name, $value)

Set key and value to data

Parameters

$name
$value

Return Value

void

See also

set, offsetSet

mixed __get(mixed $name)

Get key from data

Parameters

mixed $name

Return Value

mixed

See also

get, offsetGet

boolean __isset(string $name)

Check if key exists in data

Parameters

string $name

Return Value

boolean whether or not this object contains $name

void __unset(string $name)

Remove key from data

Parameters

string $name

Return Value

void

boolean offsetExists(mixed $offset)

Check if an offset axists

Parameters

mixed $offset

Return Value

boolean Whether or not this object contains $offset

mixed offsetGet(mixed $offset)

An alias of get()

Parameters

mixed $offset

Return Value

mixed

See also

get, __get

void offsetSet(mixed $offset, mixed $value)

Sets $offset to $value

Parameters

mixed $offset
mixed $value

Return Value

void

See also

set, __set

offsetUnset(mixed $offset)

Unset a given offset

Parameters

mixed $offset

See also

set, offsetSet, __set

boolean remove(mixed $offset)

Remove the element with the specified offset

Parameters

mixed $offset The offset to remove

Return Value

boolean True if removed otherwise false

mixed get(mixed $key)

returns a Doctrine_EventListener on success and null on failure

Parameters

mixed $key

Return Value

mixed

set(mixed $key, Doctrine_EventListener $listener)

set

Parameters

mixed $key
Doctrine_EventListener $listener

boolean contains(mixed $offset)

Check if the specified offset exists

Parameters

mixed $offset The offset to check

Return Value

boolean True if exists otherwise false

void add(object $listener, string $name = null)

add adds a listener to the chain of listeners

Parameters

object $listener
string $name

Return Value

void

void onLoad(Doctrine_Record $record)

onLoad an event invoked when Doctrine_Record is being loaded from database

Parameters

Doctrine_Record $record

Return Value

void

void onPreLoad(Doctrine_Record $record)

onPreLoad an event invoked when Doctrine_Record is being loaded from database but not yet initialized

Parameters

Doctrine_Record $record

Return Value

void

void onSleep(Doctrine_Record $record)

onSleep an event invoked when Doctrine_Record is serialized

Parameters

Doctrine_Record $record

Return Value

void

void onWakeUp(Doctrine_Record $record)

onWakeUp an event invoked when Doctrine_Record is unserialized

Parameters

Doctrine_Record $record

Return Value

void

void postClose(Doctrine_Event $event)

postClose an event invoked after Doctrine_Connection is closed

Parameters

Doctrine_Event $event

Return Value

void

void preClose(Doctrine_Event $event)

preClose an event invoked before Doctrine_Connection is closed

Parameters

Doctrine_Event $event

Return Value

void

void onOpen(Doctrine_Connection $connection)

onOpen an event invoked after Doctrine_Connection is opened

Parameters

Doctrine_Connection $connection

Return Value

void

postTransactionCommit(Doctrine_Event $event)

onTransactionCommit an event invoked after a Doctrine_Connection transaction is committed

Parameters

Doctrine_Event $event

preTransactionCommit(Doctrine_Event $event)

onPreTransactionCommit an event invoked before a Doctrine_Connection transaction is committed

Parameters

Doctrine_Event $event

postTransactionRollback(Doctrine_Event $event)

onTransactionRollback an event invoked after a Doctrine_Connection transaction is being rolled back

Parameters

Doctrine_Event $event

preTransactionRollback(Doctrine_Event $event)

onPreTransactionRollback an event invoked before a Doctrine_Connection transaction is being rolled back

Parameters

Doctrine_Event $event

postTransactionBegin(Doctrine_Event $event)

onTransactionBegin an event invoked after a Doctrine_Connection transaction has been started

Parameters

Doctrine_Event $event

preTransactionBegin(Doctrine_Event $event)

onTransactionBegin an event invoked before a Doctrine_Connection transaction is being started

Parameters

Doctrine_Event $event

void postSavepointCommit(Doctrine_Event $event)

postSavepointCommit an event invoked after a Doctrine_Connection transaction with savepoint is committed

Parameters

Doctrine_Event $event

Return Value

void

void preSavepointCommit(Doctrine_Event $event)

preSavepointCommit an event invoked before a Doctrine_Connection transaction with savepoint is committed

Parameters

Doctrine_Event $event

Return Value

void

void postSavepointRollback(Doctrine_Event $event)

postSavepointRollback an event invoked after a Doctrine_Connection transaction with savepoint is being rolled back

Parameters

Doctrine_Event $event

Return Value

void

void preSavepointRollback(Doctrine_Event $event)

preSavepointRollback an event invoked before a Doctrine_Connection transaction with savepoint is being rolled back

Parameters

Doctrine_Event $event

Return Value

void

void postSavepointCreate(Doctrine_Event $event)

postSavepointCreate an event invoked after a Doctrine_Connection transaction with savepoint has been started

Parameters

Doctrine_Event $event

Return Value

void

void preSavepointCreate(Doctrine_Event $event)

preSavepointCreate an event invoked before a Doctrine_Connection transaction with savepoint is being started

Parameters

Doctrine_Event $event

Return Value

void

void onCollectionDelete(Doctrine_Collection $collection)

onCollectionDelete an event invoked after a Doctrine_Collection is being deleted

Parameters

Doctrine_Collection $collection

Return Value

void

void onPreCollectionDelete(Doctrine_Collection $collection)

onCollectionDelete an event invoked after a Doctrine_Collection is being deleted

Parameters

Doctrine_Collection $collection

Return Value

void

postConnect(Doctrine_Event $event)

Parameters

Doctrine_Event $event

preConnect(Doctrine_Event $event)

Parameters

Doctrine_Event $event

preQuery(Doctrine_Event $event)

Parameters

Doctrine_Event $event

postQuery(Doctrine_Event $event)

Parameters

Doctrine_Event $event

prePrepare(Doctrine_Event $event)

Parameters

Doctrine_Event $event

postPrepare(Doctrine_Event $event)

Parameters

Doctrine_Event $event

preExec(Doctrine_Event $event)

Parameters

Doctrine_Event $event

postExec(Doctrine_Event $event)

Parameters

Doctrine_Event $event

preError(Doctrine_Event $event)

Parameters

Doctrine_Event $event

postError(Doctrine_Event $event)

Parameters

Doctrine_Event $event

preFetch(Doctrine_Event $event)

Parameters

Doctrine_Event $event

postFetch(Doctrine_Event $event)

Parameters

Doctrine_Event $event

preFetchAll(Doctrine_Event $event)

Parameters

Doctrine_Event $event

postFetchAll(Doctrine_Event $event)

Parameters

Doctrine_Event $event

preStmtExecute(Doctrine_Event $event)

Parameters

Doctrine_Event $event

postStmtExecute(Doctrine_Event $event)

Parameters

Doctrine_Event $event