attachObserver($this); $this->table = $table; } /** * Pre-processor for $table->load($keys, $reset) * * @param 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. * @param boolean $reset True to reset the default values before loading the new row. * * @return void */ public function onBeforeLoad($keys, $reset) { } /** * Post-processor for $table->load($keys, $reset) * * @param boolean &$result The result of the load * @param array $row The loaded (and already binded to $this->table) row of the database table * * @return void */ public function onAfterLoad(&$result, $row) { } /** * Pre-processor for $table->store($updateNulls) * * @param boolean $updateNulls The result of the load * @param string $tableKey The key of the table * * @return void */ public function onBeforeStore($updateNulls, $tableKey) { } /** * Post-processor for $table->store($updateNulls) * * @param boolean &$result The result of the store * * @return void */ public function onAfterStore(&$result) { } /** * Pre-processor for $table->delete($pk) * * @param mixed $pk An optional primary key value to delete. If not set the instance property value is used. * @param string $tableKey The normal key of the table * * @return void * * @throws UnexpectedValueException */ public function onBeforeDelete($pk, $tableKey) { } /** * Post-processor for $table->delete($pk) * * @param mixed $pk The deleted primary key value. * * @return void */ public function onAfterDelete($pk) { } }