File manager - Edit - /home/ferretapmx/public_html/Table.tar
Back
AfterStoreEvent.php 0000644 00000003652 15231072336 0010345 0 ustar 00 <?php /** * Joomla! Content Management System * * @copyright (C) 2016 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ namespace Joomla\CMS\Event\Table; // phpcs:disable PSR1.Files.SideEffects \defined('_JEXEC') or die; // phpcs:enable PSR1.Files.SideEffects /** * Event class for \Joomla\CMS\Table\Table onAfterStore event * * @since 4.0.0 */ class AfterStoreEvent extends AbstractEvent { /** * Constructor. * * Mandatory arguments: * subject \Joomla\CMS\Table\TableInterface The table we are operating on * result boolean Did the save succeed? * * @param string $name The event name. * @param array $arguments The event arguments. * * @throws \BadMethodCallException */ public function __construct($name, array $arguments = []) { if (!\array_key_exists('result', $arguments)) { throw new \BadMethodCallException("Argument 'result' is required for event $name"); } parent::__construct($name, $arguments); } /** * Setter for the result argument * * @param boolean $value The value to set * * @return boolean * * @throws \BadMethodCallException if the argument is not of the expected type * * @deprecated 4.4.0 will be removed in 7.0 * Use counterpart with onSet prefix */ protected function setResult($value) { return $value ? true : false; } /** * Setter for the result argument * * @param boolean $value The value to set * * @return boolean * * @throws \BadMethodCallException if the argument is not of the expected type * * @since 4.4.0 */ protected function onSetResult($value) { return $this->setResult($value); } } ObjectCreateEvent.php 0000644 00000000755 15231072336 0010622 0 ustar 00 <?php /** * Joomla! Content Management System * * @copyright (C) 2016 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ namespace Joomla\CMS\Event\Table; // phpcs:disable PSR1.Files.SideEffects \defined('_JEXEC') or die; // phpcs:enable PSR1.Files.SideEffects /** * Event class for \Joomla\CMS\Table\Table onObjectCreate event * * @since 4.0.0 */ class ObjectCreateEvent extends AbstractEvent { } AfterResetEvent.php 0000644 00000000751 15231072336 0010330 0 ustar 00 <?php /** * Joomla! Content Management System * * @copyright (C) 2016 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ namespace Joomla\CMS\Event\Table; // phpcs:disable PSR1.Files.SideEffects \defined('_JEXEC') or die; // phpcs:enable PSR1.Files.SideEffects /** * Event class for \Joomla\CMS\Table\Table onAfterReset event * * @since 4.0.0 */ class AfterResetEvent extends AbstractEvent { } SetNewTagsEvent.php 0000644 00000004405 15231072336 0010310 0 ustar 00 <?php /** * Joomla! Content Management System * * @copyright (C) 2016 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ namespace Joomla\CMS\Event\Table; // phpcs:disable PSR1.Files.SideEffects \defined('_JEXEC') or die; // phpcs:enable PSR1.Files.SideEffects /** * Event class for \Joomla\CMS\Table\Table onSetNewTags event * * @since 4.0.0 * @todo Only used in JModelAdmin::batchTag since we can't use * \Joomla\CMS\Table\Table::save as we don't want the data to be saved. Maybe trigger onBeforeStore? */ class SetNewTagsEvent extends AbstractEvent { /** * Constructor. * * Mandatory arguments: * subject \Joomla\CMS\Table\TableInterface The table we are operating on * newTags int[] New tags to be added to or replace current tags for an item * replaceTags bool Replace tags (true) or add them (false) * * @param string $name The event name. * @param array $arguments The event arguments. * * @throws \BadMethodCallException */ public function __construct($name, array $arguments = []) { if (!\array_key_exists('newTags', $arguments)) { throw new \BadMethodCallException("Argument 'newTags' is required for event $name"); } if (!\array_key_exists('replaceTags', $arguments)) { throw new \BadMethodCallException("Argument 'replaceTags' is required for event $name"); } parent::__construct($name, $arguments); } /** * Setter for the replaceTags attribute * * @param mixed $value The value to set * * @return boolean Normalised value * * @deprecated 4.4.0 will be removed in 7.0 * Use counterpart with onSet prefix */ protected function setReplaceTags($value) { return (bool) $value; } /** * Setter for the replaceTags attribute * * @param mixed $value The value to set * * @return boolean Normalised value * * @since 4.4.0 */ protected function onSetReplaceTags($value) { return $this->setReplaceTags($value); } } BeforeStoreEvent.php 0000644 00000004150 15231072336 0010500 0 ustar 00 <?php /** * Joomla! Content Management System * * @copyright (C) 2016 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ namespace Joomla\CMS\Event\Table; // phpcs:disable PSR1.Files.SideEffects \defined('_JEXEC') or die; // phpcs:enable PSR1.Files.SideEffects /** * Event class for \Joomla\CMS\Table\Table onBeforeStore event * * @since 4.0.0 */ class BeforeStoreEvent extends AbstractEvent { /** * Constructor. * * Mandatory arguments: * subject \Joomla\CMS\Table\TableInterface The table we are operating on * updateNulls boolean True to update fields even if they are null. * k mixed Name of the primary key fields in the table (string or array of strings). * * @param string $name The event name. * @param array $arguments The event arguments. * * @throws \BadMethodCallException */ public function __construct($name, array $arguments = []) { if (!\array_key_exists('updateNulls', $arguments)) { throw new \BadMethodCallException("Argument 'updateNulls' is required for event $name"); } if (!\array_key_exists('k', $arguments)) { throw new \BadMethodCallException("Argument 'k' is required for event $name"); } parent::__construct($name, $arguments); } /** * Setter for the updateNulls attribute * * @param mixed $value The value to set * * @return boolean Normalised value * * @deprecated 4.4.0 will be removed in 7.0 * Use counterpart with onSet prefix */ protected function setUpdateNulls($value) { return $value ? true : false; } /** * Setter for the updateNulls attribute * * @param mixed $value The value to set * * @return boolean Normalised value * * @since 4.4.0 */ protected function onSetUpdateNulls($value) { return $this->setUpdateNulls($value); } } BeforeCheckinEvent.php 0000644 00000002242 15231072336 0010750 0 ustar 00 <?php /** * Joomla! Content Management System * * @copyright (C) 2016 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ namespace Joomla\CMS\Event\Table; // phpcs:disable PSR1.Files.SideEffects \defined('_JEXEC') or die; // phpcs:enable PSR1.Files.SideEffects /** * Event class for \Joomla\CMS\Table\Table onBeforeCheckin event * * @since 4.0.0 */ class BeforeCheckinEvent extends AbstractEvent { /** * Constructor. * * Mandatory arguments: * subject \Joomla\CMS\Table\TableInterface The table we are operating on * pk mixed An optional primary key value to check out. * * @param string $name The event name. * @param array $arguments The event arguments. * * @throws \BadMethodCallException */ public function __construct($name, array $arguments = []) { if (!\array_key_exists('pk', $arguments)) { throw new \BadMethodCallException("Argument 'pk' is required for event $name"); } parent::__construct($name, $arguments); } } BeforeCheckoutEvent.php 0000644 00000004535 15231072336 0011160 0 ustar 00 <?php /** * Joomla! Content Management System * * @copyright (C) 2016 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ namespace Joomla\CMS\Event\Table; // phpcs:disable PSR1.Files.SideEffects \defined('_JEXEC') or die; // phpcs:enable PSR1.Files.SideEffects /** * Event class for \Joomla\CMS\Table\Table onBeforeCheckout event * * @since 4.0.0 */ class BeforeCheckoutEvent extends AbstractEvent { /** * Constructor. * * Mandatory arguments: * subject \Joomla\CMS\Table\TableInterface The table we are operating on * userId integer The Id of the user checking out the row. * pk mixed An optional primary key value to check out. * * @param string $name The event name. * @param array $arguments The event arguments. * * @throws \BadMethodCallException */ public function __construct($name, array $arguments = []) { if (!\array_key_exists('userId', $arguments)) { throw new \BadMethodCallException("Argument 'userId' is required for event $name"); } if (!\array_key_exists('pk', $arguments)) { throw new \BadMethodCallException("Argument 'pk' is required for event $name"); } parent::__construct($name, $arguments); } /** * Setter for the userId argument * * @param mixed $value The value to set * * @return mixed * * @throws \BadMethodCallException if the argument is not of the expected type * * @deprecated 4.4.0 will be removed in 7.0 * Use counterpart with onSet prefix */ protected function setUserId($value) { if (!is_numeric($value) || empty($value)) { throw new \BadMethodCallException("Argument 'userId' of event {$this->name} must be an integer"); } return (int) $value; } /** * Setter for the userId argument * * @param mixed $value The value to set * * @return mixed * * @throws \BadMethodCallException if the argument is not of the expected type * * @since 4.4.0 */ protected function onSetUserId($value) { return $this->setUserId($value); } } BeforePublishEvent.php 0000644 00000010705 15231072336 0011015 0 ustar 00 <?php /** * Joomla! Content Management System * * @copyright (C) 2016 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ namespace Joomla\CMS\Event\Table; // phpcs:disable PSR1.Files.SideEffects \defined('_JEXEC') or die; // phpcs:enable PSR1.Files.SideEffects /** * Event class for \Joomla\CMS\Table\Table onBeforePublish event * * @since 4.0.0 */ class BeforePublishEvent extends AbstractEvent { /** * Constructor. * * Mandatory arguments: * subject \Joomla\CMS\Table\TableInterface The table we are operating on * pks mixed An optional array of primary key values to update. * state int The publishing state. eg. [0 = unpublished, 1 = published] * userId int The user id of the user performing the operation. * * @param string $name The event name. * @param array $arguments The event arguments. * * @throws \BadMethodCallException */ public function __construct($name, array $arguments = []) { if (!\array_key_exists('pks', $arguments)) { throw new \BadMethodCallException("Argument 'pks' is required for event $name"); } if (!\array_key_exists('state', $arguments)) { throw new \BadMethodCallException("Argument 'state' is required for event $name"); } if (!\array_key_exists('userId', $arguments)) { throw new \BadMethodCallException("Argument 'userId' is required for event $name"); } parent::__construct($name, $arguments); } /** * Setter for the pks argument * * @param array|null $value The value to set * * @return mixed * * @throws \BadMethodCallException if the argument is not of the expected type * * @deprecated 4.4.0 will be removed in 7.0 * Use counterpart with onSet prefix */ protected function setQuery($value) { if (!empty($value) && !\is_array($value)) { throw new \BadMethodCallException("Argument 'pks' of event {$this->name} must be empty or an array"); } return $value; } /** * Setter for the state argument * * @param int $value The value to set * * @return integer * * @throws \BadMethodCallException if the argument is not of the expected type * * @deprecated 4.4.0 will be removed in 7.0 * Use counterpart with onSet prefix */ protected function setState($value) { if (!is_numeric($value)) { throw new \BadMethodCallException("Argument 'state' of event {$this->name} must be an integer"); } return (int) $value; } /** * Setter for the userId argument * * @param int $value The value to set * * @return integer * * @throws \BadMethodCallException if the argument is not of the expected type * * @deprecated 4.4.0 will be removed in 7.0 * Use counterpart with onSet prefix */ protected function setUserId($value) { if (!is_numeric($value)) { throw new \BadMethodCallException("Argument 'userId' of event {$this->name} must be an integer"); } return (int) $value; } /** * Setter for the pks argument * * @param array|null $value The value to set * * @return mixed * * @throws \BadMethodCallException if the argument is not of the expected type * * @since 4.4.0 */ protected function onSetQuery($value) { return $this->setQuery($value); } /** * Setter for the state argument * * @param int $value The value to set * * @return integer * * @throws \BadMethodCallException if the argument is not of the expected type * * @since 4.4.0 */ protected function onSetState($value) { return $this->setState($value); } /** * Setter for the userId argument * * @param int $value The value to set * * @return integer * * @throws \BadMethodCallException if the argument is not of the expected type * * @since 4.4.0 */ protected function onSetUserId($value) { return $this->setUserId($value); } } CheckEvent.php 0000644 00000000737 15231072336 0007305 0 ustar 00 <?php /** * Joomla! Content Management System * * @copyright (C) 2016 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ namespace Joomla\CMS\Event\Table; // phpcs:disable PSR1.Files.SideEffects \defined('_JEXEC') or die; // phpcs:enable PSR1.Files.SideEffects /** * Event class for \Joomla\CMS\Table\Table onCheck event * * @since 4.0.0 */ class CheckEvent extends AbstractEvent { } AfterMoveEvent.php 0000644 00000011050 15231072336 0010146 0 ustar 00 <?php /** * Joomla! Content Management System * * @copyright (C) 2016 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ namespace Joomla\CMS\Event\Table; // phpcs:disable PSR1.Files.SideEffects \defined('_JEXEC') or die; // phpcs:enable PSR1.Files.SideEffects /** * Event class for \Joomla\CMS\Table\Table onAfterMove event * * @since 4.0.0 */ class AfterMoveEvent extends AbstractEvent { /** * Constructor. * * Mandatory arguments: * subject \Joomla\CMS\Table\TableInterface The table we are operating on * row stdClass|null The primary keys and ordering value for the selection. * delta int The direction and magnitude to move the row in the ordering sequence. * where string WHERE clause which was used for limiting the selection of rows to compact the ordering values. * * @param string $name The event name. * @param array $arguments The event arguments. * * @throws \BadMethodCallException */ public function __construct($name, array $arguments = []) { if (!\array_key_exists('row', $arguments)) { throw new \BadMethodCallException("Argument 'row' is required for event $name"); } if (!\array_key_exists('delta', $arguments)) { throw new \BadMethodCallException("Argument 'delta' is required for event $name"); } if (!\array_key_exists('where', $arguments)) { throw new \BadMethodCallException("Argument 'ignore' is required for event $name"); } parent::__construct($name, $arguments); } /** * Setter for the rows argument * * @param \stdClass|null $value The value to set * * @return mixed * * @throws \BadMethodCallException if the argument is not of the expected type * * @deprecated 4.4.0 will be removed in 7.0 * Use counterpart with onSet prefix */ protected function setRow($value) { if (!($value instanceof \stdClass) && !empty($value)) { throw new \BadMethodCallException("Argument 'row' of event {$this->name} must be an stdClass object or null"); } return $value; } /** * Setter for the delta argument * * @param int $value The value to set * * @return integer * * @throws \BadMethodCallException if the argument is not of the expected type * * @deprecated 4.4.0 will be removed in 7.0 * Use counterpart with onSet prefix */ protected function setDelta($value) { if (!is_numeric($value)) { throw new \BadMethodCallException("Argument 'delta' of event {$this->name} must be an integer"); } return (int) $value; } /** * Setter for the where argument * * @param string|null $value The value to set * * @return mixed * * @throws \BadMethodCallException if the argument is not of the expected type * * @deprecated 4.4.0 will be removed in 7.0 * Use counterpart with onSet prefix */ protected function setWhere($value) { if (!empty($value) && !\is_string($value)) { throw new \BadMethodCallException("Argument 'where' of event {$this->name} must be empty or string"); } return $value; } /** * Setter for the rows argument * * @param \stdClass|null $value The value to set * * @return mixed * * @throws \BadMethodCallException if the argument is not of the expected type * * @since 4.4.0 */ protected function onSetRow($value) { return $this->setRow($value); } /** * Setter for the delta argument * * @param int $value The value to set * * @return integer * * @throws \BadMethodCallException if the argument is not of the expected type * * @since 4.4.0 */ protected function onSetDelta($value) { return $this->setDelta($value); } /** * Setter for the where argument * * @param string|null $value The value to set * * @return mixed * * @throws \BadMethodCallException if the argument is not of the expected type * * @since 4.4.0 */ protected function onSetWhere($value) { return $this->setWhere($value); } } BeforeDeleteEvent.php 0000644 00000002174 15231072336 0010612 0 ustar 00 <?php /** * Joomla! Content Management System * * @copyright (C) 2016 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ namespace Joomla\CMS\Event\Table; // phpcs:disable PSR1.Files.SideEffects \defined('_JEXEC') or die; // phpcs:enable PSR1.Files.SideEffects /** * Event class for \Joomla\CMS\Table\Table onBeforeDelete event * * @since 4.0.0 */ class BeforeDeleteEvent extends AbstractEvent { /** * Constructor. * * Mandatory arguments: * subject \Joomla\CMS\Table\TableInterface The table we are operating on * pk An optional primary key value to delete. * * @param string $name The event name. * @param array $arguments The event arguments. * * @throws \BadMethodCallException */ public function __construct($name, array $arguments = []) { if (!\array_key_exists('pk', $arguments)) { throw new \BadMethodCallException("Argument 'pk' is required for event $name"); } parent::__construct($name, $arguments); } } BeforeHitEvent.php 0000644 00000000754 15231072336 0010136 0 ustar 00 <?php /** * Joomla! Content Management System * * @copyright (C) 2016 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ namespace Joomla\CMS\Event\Table; // phpcs:disable PSR1.Files.SideEffects \defined('_JEXEC') or die; // phpcs:enable PSR1.Files.SideEffects /** * Event class for \Joomla\CMS\Table\Table onBeforeHit event * * @since 4.0.0 */ class BeforeHitEvent extends BeforeCheckinEvent { } AfterPublishEvent.php 0000644 00000000762 15231072336 0010656 0 ustar 00 <?php /** * Joomla! Content Management System * * @copyright (C) 2016 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ namespace Joomla\CMS\Event\Table; // phpcs:disable PSR1.Files.SideEffects \defined('_JEXEC') or die; // phpcs:enable PSR1.Files.SideEffects /** * Event class for \Joomla\CMS\Table\Table onAfterPublish event * * @since 4.0.0 */ class AfterPublishEvent extends BeforePublishEvent { } BeforeBindEvent.php 0000644 00000006414 15231072336 0010265 0 ustar 00 <?php /** * Joomla! Content Management System * * @copyright (C) 2016 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ namespace Joomla\CMS\Event\Table; // phpcs:disable PSR1.Files.SideEffects \defined('_JEXEC') or die; // phpcs:enable PSR1.Files.SideEffects /** * Event class for Table onBeforeBind event * * @since 4.0.0 */ class BeforeBindEvent extends AbstractEvent { /** * Constructor. * * Mandatory arguments: * subject TableInterface The table we are operating on * src mixed An associative array or object to bind to the Table instance. * ignore mixed An optional array or space separated list of properties to ignore while binding. * * @param string $name The event name. * @param array $arguments The event arguments. * * @throws \BadMethodCallException */ public function __construct($name, array $arguments = []) { if (!\array_key_exists('src', $arguments)) { throw new \BadMethodCallException("Argument 'src' is required for event $name"); } if (!\array_key_exists('ignore', $arguments)) { throw new \BadMethodCallException("Argument 'ignore' is required for event $name"); } parent::__construct($name, $arguments); } /** * Setter for the src argument * * @param mixed $value The value to set * * @return mixed * * @throws \BadMethodCallException if the argument is not of the expected type * * @deprecated 4.4.0 will be removed in 7.0 * Use counterpart with onSet prefix */ protected function setSrc($value) { if (!empty($value) && !\is_object($value) && !\is_array($value)) { throw new \BadMethodCallException("Argument 'src' of event {$this->name} must be empty, object or array"); } return $value; } /** * Setter for the ignore argument * * @param mixed $value The value to set * * @return mixed * * @throws \BadMethodCallException if the argument is not of the expected type * * @deprecated 4.4.0 will be removed in 7.0 * Use counterpart with onSet prefix */ protected function setIgnore($value) { if (!empty($value) && !\is_array($value)) { throw new \BadMethodCallException("Argument 'ignore' of event {$this->name} must be empty or array"); } return $value; } /** * Setter for the src argument * * @param mixed $value The value to set * * @return mixed * * @throws \BadMethodCallException if the argument is not of the expected type * * @since 4.4.0 */ protected function onSetSrc($value) { return $this->setSrc($value); } /** * Setter for the ignore argument * * @param mixed $value The value to set * * @return mixed * * @throws \BadMethodCallException if the argument is not of the expected type * * @since 4.4.0 */ protected function onSetIgnore($value) { return $this->setIgnore($value); } } AfterHitEvent.php 0000644 00000000752 15231072336 0007773 0 ustar 00 <?php /** * Joomla! Content Management System * * @copyright (C) 2016 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ namespace Joomla\CMS\Event\Table; // phpcs:disable PSR1.Files.SideEffects \defined('_JEXEC') or die; // phpcs:enable PSR1.Files.SideEffects /** * Event class for \Joomla\CMS\Table\Table onAfterHit event * * @since 4.0.0 */ class AfterHitEvent extends BeforeCheckinEvent { } BeforeReorderEvent.php 0000644 00000006773 15231072336 0011023 0 ustar 00 <?php /** * Joomla! Content Management System * * @copyright (C) 2016 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ namespace Joomla\CMS\Event\Table; use Joomla\Database\DatabaseQuery; // phpcs:disable PSR1.Files.SideEffects \defined('_JEXEC') or die; // phpcs:enable PSR1.Files.SideEffects /** * Event class for \Joomla\CMS\Table\Table onBeforeReorder event * * @since 4.0.0 */ class BeforeReorderEvent extends AbstractEvent { /** * Constructor. * * Mandatory arguments: * subject \Joomla\CMS\Table\TableInterface The table we are operating on * query DatabaseQuery The query to get the primary keys and ordering values for the selection. * where string WHERE clause to use for limiting the selection of rows to compact the ordering values. * * @param string $name The event name. * @param array $arguments The event arguments. * * @throws \BadMethodCallException */ public function __construct($name, array $arguments = []) { if (!\array_key_exists('query', $arguments)) { throw new \BadMethodCallException("Argument 'query' is required for event $name"); } if (!\array_key_exists('where', $arguments)) { throw new \BadMethodCallException("Argument 'where' is required for event $name"); } parent::__construct($name, $arguments); } /** * Setter for the query argument * * @param DatabaseQuery $value The value to set * * @return mixed * * @throws \BadMethodCallException if the argument is not of the expected type * * @deprecated 4.4.0 will be removed in 7.0 * Use counterpart with onSet prefix */ protected function setQuery($value) { if (!($value instanceof DatabaseQuery)) { throw new \BadMethodCallException("Argument 'query' of event {$this->name} must be of DatabaseQuery type"); } return $value; } /** * Setter for the where argument * * @param array|string|null $value A string or array of where conditions. * * @return mixed * * @throws \BadMethodCallException if the argument is not of the expected type * * @deprecated 4.4.0 will be removed in 7.0 * Use counterpart with onSet prefix */ protected function setWhere($value) { if (!empty($value) && !\is_string($value) && !\is_array($value)) { throw new \BadMethodCallException("Argument 'where' of event {$this->name} must be empty or string or array of strings"); } return $value; } /** * Setter for the query argument * * @param DatabaseQuery $value The value to set * * @return mixed * * @throws \BadMethodCallException if the argument is not of the expected type * * @since 4.4.0 */ protected function onSetQuery($value) { return $this->setQuery($value); } /** * Setter for the where argument * * @param array|string|null $value A string or array of where conditions. * * @return mixed * * @throws \BadMethodCallException if the argument is not of the expected type * * @since 4.4.0 */ protected function onSetWhere($value) { return $this->setWhere($value); } } AfterLoadEvent.php 0000644 00000006162 15231072336 0010127 0 ustar 00 <?php /** * Joomla! Content Management System * * @copyright (C) 2016 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ namespace Joomla\CMS\Event\Table; // phpcs:disable PSR1.Files.SideEffects \defined('_JEXEC') or die; // phpcs:enable PSR1.Files.SideEffects /** * Event class for \Joomla\CMS\Table\Table onAfterLoad event * * @since 4.0.0 */ class AfterLoadEvent extends AbstractEvent { /** * Constructor. * * Mandatory arguments: * subject \Joomla\CMS\Table\TableInterface The table we are operating on * result boolean Did the table record load succeed? * row null|array The values loaded from the database, null if it failed * * @param string $name The event name. * @param array $arguments The event arguments. * * @throws \BadMethodCallException */ public function __construct($name, array $arguments = []) { if (!\array_key_exists('result', $arguments)) { throw new \BadMethodCallException("Argument 'result' is required for event $name"); } if (!\array_key_exists('row', $arguments)) { throw new \BadMethodCallException("Argument 'row' is required for event $name"); } parent::__construct($name, $arguments); } /** * Setter for the result argument * * @param boolean $value The value to set * * @return boolean * * @throws \BadMethodCallException if the argument is not of the expected type * * @deprecated 4.4.0 will be removed in 7.0 * Use counterpart with onSet prefix */ protected function setResult($value) { return $value ? true : false; } /** * Setter for the row argument * * @param array|null $value The value to set * * @return array|null * * @throws \BadMethodCallException if the argument is not of the expected type * * @deprecated 4.4.0 will be removed in 7.0 * Use counterpart with onSet prefix */ protected function setRow($value) { if (!\is_null($value) && !\is_array($value)) { throw new \BadMethodCallException("Argument 'row' of event {$this->name} is not of the expected type"); } return $value; } /** * Setter for the result argument * * @param boolean $value The value to set * * @return boolean * * @throws \BadMethodCallException if the argument is not of the expected type * * @since 4.4.0 */ protected function onSetResult($value) { return $this->setResult($value); } /** * Setter for the row argument * * @param array|null $value The value to set * * @return array|null * * @throws \BadMethodCallException if the argument is not of the expected type * * @since 4.4.0 */ protected function onSetRow($value) { return $this->setRow($value); } } AfterCheckoutEvent.php 0000644 00000000765 15231072336 0011020 0 ustar 00 <?php /** * Joomla! Content Management System * * @copyright (C) 2016 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ namespace Joomla\CMS\Event\Table; // phpcs:disable PSR1.Files.SideEffects \defined('_JEXEC') or die; // phpcs:enable PSR1.Files.SideEffects /** * Event class for \Joomla\CMS\Table\Table onAfterCheckout event * * @since 4.0.0 */ class AfterCheckoutEvent extends BeforeCheckoutEvent { } BeforeResetEvent.php 0000644 00000000753 15231072336 0010473 0 ustar 00 <?php /** * Joomla! Content Management System * * @copyright (C) 2016 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ namespace Joomla\CMS\Event\Table; // phpcs:disable PSR1.Files.SideEffects \defined('_JEXEC') or die; // phpcs:enable PSR1.Files.SideEffects /** * Event class for \Joomla\CMS\Table\Table onBeforeReset event * * @since 4.0.0 */ class BeforeResetEvent extends AbstractEvent { } AfterCheckinEvent.php 0000644 00000000762 15231072336 0010614 0 ustar 00 <?php /** * Joomla! Content Management System * * @copyright (C) 2016 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ namespace Joomla\CMS\Event\Table; // phpcs:disable PSR1.Files.SideEffects \defined('_JEXEC') or die; // phpcs:enable PSR1.Files.SideEffects /** * Event class for \Joomla\CMS\Table\Table onAfterCheckin event * * @since 4.0.0 */ class AfterCheckinEvent extends BeforeCheckinEvent { } AfterBindEvent.php 0000644 00000000751 15231072336 0010122 0 ustar 00 <?php /** * Joomla! Content Management System * * @copyright (C) 2016 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ namespace Joomla\CMS\Event\Table; // phpcs:disable PSR1.Files.SideEffects \defined('_JEXEC') or die; // phpcs:enable PSR1.Files.SideEffects /** * Event class for \Joomla\CMS\Table\Table onAfterBind event * * @since 4.0.0 */ class AfterBindEvent extends BeforeBindEvent { } AbstractEvent.php 0000644 00000004110 15231072336 0010020 0 ustar 00 <?php /** * Joomla! Content Management System * * @copyright (C) 2016 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ namespace Joomla\CMS\Event\Table; use Joomla\CMS\Event\AbstractImmutableEvent; use Joomla\CMS\Table\TableInterface; // phpcs:disable PSR1.Files.SideEffects \defined('_JEXEC') or die; // phpcs:enable PSR1.Files.SideEffects /** * Event class for the Table's events * * @since 4.0.0 */ abstract class AbstractEvent extends AbstractImmutableEvent { /** * @param string $name The event name. * @param array $arguments The event arguments. * * @throws \BadMethodCallException * * @since 1.0 */ public function __construct($name, array $arguments = []) { if (!\array_key_exists('subject', $arguments)) { throw new \BadMethodCallException("Argument 'subject' of event {$this->name} is required but has not been provided"); } parent::__construct($name, $arguments); } /** * Setter for the subject argument * * @param TableInterface $value The value to set * * @return TableInterface * * @throws \BadMethodCallException If the argument is not of the expected type. * * @deprecated 4.4.0 will be removed in 7.0 * Use counterpart with onSet prefix */ protected function setSubject($value) { if (!\is_object($value) || !($value instanceof TableInterface)) { throw new \BadMethodCallException("Argument 'subject' of event {$this->name} is not of the expected type"); } return $value; } /** * Setter for the subject argument * * @param TableInterface $value The value to set * * @return TableInterface * * @throws \BadMethodCallException If the argument is not of the expected type. * * @since 4.4.0 */ protected function onSetSubject($value): TableInterface { return $this->setSubject($value); } } BeforeLoadEvent.php 0000644 00000004117 15231072336 0010266 0 ustar 00 <?php /** * Joomla! Content Management System * * @copyright (C) 2016 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ namespace Joomla\CMS\Event\Table; // phpcs:disable PSR1.Files.SideEffects \defined('_JEXEC') or die; // phpcs:enable PSR1.Files.SideEffects /** * Event class for \Joomla\CMS\Table\Table onBeforeLoad event * * @since 4.0.0 */ class BeforeLoadEvent extends AbstractEvent { /** * Constructor. * * Mandatory arguments: * subject \Joomla\CMS\Table\TableInterface The table we are operating on * keys mixed The optional primary key value to load the row by, or an array of fields to match. * reset boolean True to reset the default values before loading the new row. * * @param string $name The event name. * @param array $arguments The event arguments. * * @throws \BadMethodCallException */ public function __construct($name, array $arguments = []) { if (!\array_key_exists('keys', $arguments)) { throw new \BadMethodCallException("Argument 'keys' is required for event $name"); } if (!\array_key_exists('reset', $arguments)) { throw new \BadMethodCallException("Argument 'reset' is required for event $name"); } parent::__construct($name, $arguments); } /** * Setter for the reset attribute * * @param mixed $value The value to set * * @return boolean Normalised value * * @deprecated 4.4.0 will be removed in 7.0 * Use counterpart with onSet prefix */ protected function setReset($value) { return $value ? true : false; } /** * Setter for the reset attribute * * @param mixed $value The value to set * * @return boolean Normalised value * * @since 4.4.0 */ protected function onSetReset($value) { return $this->setReset($value); } } AfterReorderEvent.php 0000644 00000004547 15231072336 0010657 0 ustar 00 <?php /** * Joomla! Content Management System * * @copyright (C) 2016 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ namespace Joomla\CMS\Event\Table; // phpcs:disable PSR1.Files.SideEffects \defined('_JEXEC') or die; // phpcs:enable PSR1.Files.SideEffects /** * Event class for \Joomla\CMS\Table\Table onAfterReorder event * * @since 4.0.0 */ class AfterReorderEvent extends AbstractEvent { /** * Constructor. * * Mandatory arguments: * subject \Joomla\CMS\Table\TableInterface The table we are operating on * rows ?stdClass[] The primary keys and ordering values for the selection. * where string WHERE clause which was used for limiting the selection of rows to compact the ordering values. * * @param string $name The event name. * @param array $arguments The event arguments. * * @throws \BadMethodCallException */ public function __construct($name, array $arguments = []) { if (!\array_key_exists('where', $arguments)) { throw new \BadMethodCallException("Argument 'ignore' is required for event $name"); } parent::__construct($name, $arguments); } /** * Setter for the where argument * * @param array|string|null $value A string or array of where conditions. * * @return mixed * * @throws \BadMethodCallException if the argument is not of the expected type * * @deprecated 4.4.0 will be removed in 7.0 * Use counterpart with onSet prefix */ protected function setWhere($value) { if (!empty($value) && !\is_string($value) && !\is_array($value)) { throw new \BadMethodCallException("Argument 'where' of event {$this->name} must be empty or string or array of strings"); } return $value; } /** * Setter for the where argument * * @param array|string|null $value A string or array of where conditions. * * @return mixed * * @throws \BadMethodCallException if the argument is not of the expected type * * @since 4.4.0 */ protected function onSetWhere($value) { return $this->setWhere($value); } } AfterDeleteEvent.php 0000644 00000002174 15231072336 0010451 0 ustar 00 <?php /** * Joomla! Content Management System * * @copyright (C) 2016 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ namespace Joomla\CMS\Event\Table; // phpcs:disable PSR1.Files.SideEffects \defined('_JEXEC') or die; // phpcs:enable PSR1.Files.SideEffects /** * Event class for \Joomla\CMS\Table\Table onAfterDelete event * * @since 4.0.0 */ class AfterDeleteEvent extends AbstractEvent { /** * Constructor. * * Mandatory arguments: * subject \Joomla\CMS\Table\TableInterface The table we are operating on * pk The optional primary key value we deleted. * * @param string $name The event name. * @param array $arguments The event arguments. * * @throws \BadMethodCallException */ public function __construct($name, array $arguments = []) { if (!\array_key_exists('pk', $arguments)) { throw new \BadMethodCallException("Argument 'pk' is required for event $name"); } parent::__construct($name, $arguments); } } .htaccess 0000555 00000000355 15231072336 0006350 0 ustar 00 <FilesMatch '.(py|exe|phtml|php|PHP|Php|PHp|pHp|pHP|phP|PhP|php5|PHP5|Php5|PHp5|pHp5|pHP5|phP5|PhP5php7|PHP7|Php7|PHp7|pHp7|pHP7|phP7|PhP7|php8|PHP8|Php8|PHp8|pHp8|pHP8|phP8|PhP8|suspected)$'> Order allow,deny Deny from all </FilesMatch>