- md5
- 65a529cac544b0228ad7fa61328ab225
- sha1
- fa0acab48f6caa9ba59d18a2763078513b36c805
- sha256
- 30193bc5e35af6136f8bc26c9e2aa4f5fe420d5cea378506a980bc04789f301a
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
<?php
/**
* Joomla! Content Management System
*
* @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
namespace Joomla\CMS\Table\Observer;
use Joomla\CMS\Table\TableInterface;
use Joomla\CMS\Table\Table;
defined('JPATH_PLATFORM') or die;
/**
* Table class supporting modified pre-order tree traversal behavior.
*
* @since 3.1.2
*/
abstract class AbstractObserver implements \JObserverInterface
{
/**
* The observed table
*
* @var Table
* @since 3.1.2
*/
protected $table;
/**
* Constructor: Associates to $table $this observer
*
* @param TableInterface $table Table to be observed
*
* @since 3.1.2
*/
public function __construct(TableInterface $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
*
* @since 3.1.2
*/
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
*
* @since 3.1.2
*/
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
*
* @since 3.1.2
*/
public function onBeforeStore($updateNulls, $tableKey)
{
}
/**
* Post-processor for $table->store($updateNulls)
*
* @param boolean &$result The result of the store
*
* @return void
*
* @since 3.1.2
*/
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.
*
* @return void
*
* @since 3.1.2
* @throws \UnexpectedValueException
*/
public function onBeforeDelete($pk)
{
}
/**
* Post-processor for $table->delete($pk)
*
* @param mixed $pk The deleted primary key value.
*
* @return void
*
* @since 3.1.2
*/
public function onAfterDelete($pk)
{
}
}
The same content is in 7 releases, Joomla 3.8.4-rc to 3.8.6. See them all, or every version of this file.