- md5
- abc954f5252bec587e8351dd5134d987
- sha1
- 5fb65c3625d03a9341c1186dcd27c4a0bd750acb
- sha256
- a1cbc48f85268fd342c16d10cf0c74c877b5845871891b20f37fb36ce2ed50f8
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251
<?php
/**
* @package FrameworkOnFramework
* @subpackage table
* @copyright Copyright (C) 2010-2016 Nicholas K. Dionysopoulos / Akeeba Ltd. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
// Protect from unauthorized access
defined('FOF_INCLUDED') or die;
/**
* FrameworkOnFramework table behavior class. It defines the events which are
* called by a Table.
*
* @codeCoverageIgnore
* @package FrameworkOnFramework
* @since 2.1
*/
abstract class FOFTableBehavior extends FOFUtilsObservableEvent
{
/**
* This event runs before binding data to the table
*
* @param FOFTable &$table The table which calls this event
* @param array &$data The data to bind
*
* @return boolean True on success
*/
public function onBeforeBind(&$table, &$data)
{
return true;
}
/**
* The event which runs after binding data to the table
*
* @param FOFTable &$table The table which calls this event
* @param object|array &$src The data to bind
*
* @return boolean True on success
*/
public function onAfterBind(&$table, &$src)
{
return true;
}
/**
* The event which runs after loading a record from the database
*
* @param FOFTable &$table The table which calls this event
* @param boolean &$result Did the load succeeded?
*
* @return void
*/
public function onAfterLoad(&$table, &$result)
{
}
/**
* The event which runs before storing (saving) data to the database
*
* @param FOFTable &$table The table which calls this event
* @param boolean $updateNulls Should nulls be saved as nulls (true) or just skipped over (false)?
*
* @return boolean True to allow saving
*/
public function onBeforeStore(&$table, $updateNulls)
{
return true;
}
/**
* The event which runs after storing (saving) data to the database
*
* @param FOFTable &$table The table which calls this event
*
* @return boolean True to allow saving without an error
*/
public function onAfterStore(&$table)
{
return true;
}
/**
* The event which runs before moving a record
*
* @param FOFTable &$table The table which calls this event
* @param boolean $updateNulls Should nulls be saved as nulls (true) or just skipped over (false)?
*
* @return boolean True to allow moving
*/
public function onBeforeMove(&$table, $updateNulls)
{
return true;
}
/**
* The event which runs after moving a record
*
* @param FOFTable &$table The table which calls this event
*
* @return boolean True to allow moving without an error
*/
public function onAfterMove(&$table)
{
return true;
}
/**
* The event which runs before reordering a table
*
* @param FOFTable &$table The table which calls this event
* @param string $where The WHERE clause of the SQL query to run on reordering (record filter)
*
* @return boolean True to allow reordering
*/
public function onBeforeReorder(&$table, $where = '')
{
return true;
}
/**
* The event which runs after reordering a table
*
* @param FOFTable &$table The table which calls this event
*
* @return boolean True to allow the reordering to complete without an error
*/
public function onAfterReorder(&$table)
{
return true;
}
/**
* The event which runs before deleting a record
*
* @param FOFTable &$table The table which calls this event
* @param integer $oid The PK value of the record to delete
*
* @return boolean True to allow the deletion
*/
public function onBeforeDelete(&$table, $oid)
{
return true;
}
/**
* The event which runs after deleting a record
*
* @param FOFTable &$table The table which calls this event
* @param integer $oid The PK value of the record which was deleted
*
* @return boolean True to allow the deletion without errors
*/
public function onAfterDelete(&$table, $oid)
{
return true;
}
/**
* The event which runs before hitting a record
*
* @param FOFTable &$table The table which calls this event
* @param integer $oid The PK value of the record to hit
* @param boolean $log Should we log the hit?
*
* @return boolean True to allow the hit
*/
public function onBeforeHit(&$table, $oid, $log)
{
return true;
}
/**
* The event which runs after hitting a record
*
* @param FOFTable &$table The table which calls this event
* @param integer $oid The PK value of the record which was hit
*
* @return boolean True to allow the hitting without errors
*/
public function onAfterHit(&$table, $oid)
{
return true;
}
/**
* The even which runs before copying a record
*
* @param FOFTable &$table The table which calls this event
* @param integer $oid The PK value of the record being copied
*
* @return boolean True to allow the copy to take place
*/
public function onBeforeCopy(&$table, $oid)
{
return true;
}
/**
* The even which runs after copying a record
*
* @param FOFTable &$table The table which calls this event
* @param integer $oid The PK value of the record which was copied (not the new one)
*
* @return boolean True to allow the copy without errors
*/
public function onAfterCopy(&$table, $oid)
{
return true;
}
/**
* The event which runs before a record is (un)published
*
* @param FOFTable &$table The table which calls this event
* @param integer|array &$cid The PK IDs of the records being (un)published
* @param integer $publish 1 to publish, 0 to unpublish
*
* @return boolean True to allow the (un)publish to proceed
*/
public function onBeforePublish(&$table, &$cid, $publish)
{
return true;
}
/**
* The event which runs after the object is reset to its default values.
*
* @param FOFTable &$table The table which calls this event
*
* @return boolean True to allow the reset to complete without errors
*/
public function onAfterReset(&$table)
{
return true;
}
/**
* The even which runs before the object is reset to its default values.
*
* @param FOFTable &$table The table which calls this event
*
* @return boolean True to allow the reset to complete
*/
public function onBeforeReset(&$table)
{
return true;
}
}
The same content is in 151 releases, Joomla 3.6.3-rc1 to 3.10.12. See them all, or every version of this file.