- md5
- 210102fb1daae6788cd43c206f833f68
- sha1
- a0c39892e63f48d2771cafbad4662aa4be1c3766
- sha256
- a05281ada6c1a376d3c4374fee117dd5d7bf373e0495b33f91956b0a165e23f4
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
<?php
/**
* @package Joomla.Platform
* @subpackage Table
*
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE
*/
defined('JPATH_PLATFORM') or die;
/**
* Table class supporting modified pre-order tree traversal behavior.
*
* @package Joomla
* @subpackage Table
* @link http://docs.joomla.org/JTableObserver
* @since 3.1.2
*/
abstract class JTableObserver implements JObserverInterface
{
/**
* The observed table
*
* @var JTable
*/
protected $table;
/**
* Constructor: Associates to $table $this observer
*
* @param JTable $table Table to be observed
*/
public function __construct(JTable $table)
{
$table->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)
{
}
}
The same content is in 3 releases, Joomla 3.1.4 to 3.1.6. See them all, or every version of this file.