CoreFiles by mySites.guru
StatefulModelInterface.php43 lines, 1,069 bytes, from Joomla_4.0.0-beta1-Beta-Full_Package.zip
Raw History Compare with 3.9.0-beta4
md5
17043e17f3936f11d5ea6fc7151adcff
sha1
8a87b5e3dc6cc6051008ce84572d94d3598d3a7b
sha256
b32c07b759dd4a7963e35655796c6ed6549a6a9e97f028b72b823239eb46e83e
<?php
/**
 * Joomla! Content Management System
 *
 * @copyright  Copyright (C) 2005 - 2020 Open Source Matters, Inc. All rights reserved.
 * @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 5 releases, Joomla 4.0.0-beta to 4.0.0-beta5. See them all, or every version of this file.