CoreFiles by mySites.guru
StatefulModelInterface.php46 lines, 1,202 bytes, from Joomla_4.4.8-Stable-Full_Package.zip
Raw History Compare with 4.4.7
md5
ec44d22587c84a8ed837bf01cb6f1be1
sha1
9d3fc36ecd346fd509d85e164a082ece1aa1e1b6
sha256
90d21cf033f54fb2548023893ed73e87e71658bbd88d3d94e7df644cb819a313
<?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;

// phpcs:disable PSR1.Files.SideEffects
\defined('JPATH_PLATFORM') or die;
// phpcs:enable PSR1.Files.SideEffects

/**
 * 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 70 releases, Joomla 4.2.1 to 4.4.14. See them all, or every version of this file.