class AbstractObserver implements JObserverInterface

Table class supporting modified pre-order tree traversal behavior.

Methods

__construct( TableInterface $table)

Constructor: Associates to $table $this observer

void
onBeforeLoad( mixed $keys, boolean $reset)

Pre-processor for $table->load($keys, $reset)

void
onAfterLoad( boolean $result, array $row)

Post-processor for $table->load($keys, $reset)

void
onBeforeStore( boolean $updateNulls, string $tableKey)

Pre-processor for $table->store($updateNulls)

void
onAfterStore( boolean $result)

Post-processor for $table->store($updateNulls)

void
onBeforeDelete( mixed $pk)

Pre-processor for $table->delete($pk)

void
onAfterDelete( mixed $pk)

Post-processor for $table->delete($pk)

Details

__construct( TableInterface $table)

Constructor: Associates to $table $this observer

Parameters

TableInterface $table Table to be observed

void onBeforeLoad( mixed $keys, boolean $reset)

Pre-processor for $table->load($keys, $reset)

Parameters

mixed $keys An optional primary key value to load the row by, or an array of fields to match. If not set the instance property value is used.
boolean $reset True to reset the default values before loading the new row.

Return Value

void

void onAfterLoad( boolean $result, array $row)

Post-processor for $table->load($keys, $reset)

Parameters

boolean $result &$result The result of the load
array $row The loaded (and already binded to $this->table) row of the database table

Return Value

void

void onBeforeStore( boolean $updateNulls, string $tableKey)

Pre-processor for $table->store($updateNulls)

Parameters

boolean $updateNulls The result of the load
string $tableKey The key of the table

Return Value

void

void onAfterStore( boolean $result)

Post-processor for $table->store($updateNulls)

Parameters

boolean $result &$result The result of the store

Return Value

void

void onBeforeDelete( mixed $pk)

Pre-processor for $table->delete($pk)

Parameters

mixed $pk An optional primary key value to delete. If not set the instance property value is used.

Return Value

void

Exceptions

UnexpectedValueException

void onAfterDelete( mixed $pk)

Post-processor for $table->delete($pk)

Parameters

mixed $pk The deleted primary key value.

Return Value

void