CoreFiles by mySites.guru
AfterStoreEvent.php58 lines, 1,291 bytes, from Joomla_4.0.0-alpha12-Alpha-Full_Package.zip
Raw History Compare with 4.0.0-alpha11
md5
8d3df70c4f695a9ad8cc65ef6dbb84aa
sha1
e5949f4a291db47b0ae487c13142d89b224a271f
sha256
7ae5f48f68e1c62298b6226a50732507eeb001d8675a4eac553b5bc026987f96
<?php
/**
 * Joomla! Content Management System
 *
 * @copyright  Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
 * @license    GNU General Public License version 2 or later; see LICENSE
 */

namespace Joomla\CMS\Event\Table;

\defined('JPATH_PLATFORM') or die;

use BadMethodCallException;

/**
 * Event class for JTable's onAfterStore event
 *
 * @since  4.0.0
 */
class AfterStoreEvent extends AbstractEvent
{
	/**
	 * Constructor.
	 *
	 * Mandatory arguments:
	 * subject		JTableInterface	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 = array())
	{
		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
	 */
	protected function setResult($value)
	{
		return $value ? true : false;
	}

}

No other release has this exact content. See every version of this file.