CoreFiles by mySites.guru
StatefulModelInterface.php43 lines, 1,056 bytes, from Joomla_4.0.4-Stable-Full_Package.zip
Raw History Compare with 4.0.3
md5
2e5ed6ffbefaf770091d74de11c267a7
sha1
ebcb786f892c22967803f5062b3b665f5190bf42
sha256
7b4667954b3a10bb9b64f62676c21bc4b44a2d40f60e3b9bb0d4db3693c8aeb1
<?php
/**
 * Joomla! Content Management System
 *
 * @copyright  (C) 2019 Open Source Matters, Inc. <https://www.joomla.org>
 * @license    GNU General Public License version 2 or later; see LICENSE.txt
 */

namespace Joomla\CMS\MVC\Model;

\defined('JPATH_PLATFORM') or die;

/**
 * Interface for a stateful model.
 *
 * @since  4.0.0
 */
interface StatefulModelInterface
{
	/**
	 * Method to get model state variables.
	 *
	 * @param   string  $property  Optional parameter name
	 * @param   mixed   $default   Optional default value
	 *
	 * @return  mixed  The property where specified, the state object where omitted
	 *
	 * @since   4.0.0
	 */
	public function getState($property = null, $default = null);

	/**
	 * Method to set model state variables.
	 *
	 * @param   string  $property  The name of the property.
	 * @param   mixed   $value     The value of the property to set or null.
	 *
	 * @return  mixed  The previous value of the property or null if not set.
	 *
	 * @since   4.0.0
	 */
	public function setState($property, $value = null);
}

The same content is in 51 releases, Joomla 4.0.0-beta6 to 4.2.0-beta2. See them all, or every version of this file.