CoreFiles by mySites.guru
observer.php58 lines, 1,186 bytes, from Joomla_3.6.5-Stable-Full_Package.zip
Raw History Compare with 3.6.4
md5
1d861cca9203740ccc66355dfef3526a
sha1
b89a6ef02736eaf97b74ec0bdd2edb9e4c12596d
sha256
70a5cc8677bda0dbf5d6f8c7e36fe9ef544abeb58946c82798518968070b5067
<?php
/**
 * @package     Joomla.Legacy
 * @subpackage  Base
 *
 * @copyright   Copyright (C) 2005 - 2016 Open Source Matters, Inc. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE
 */

defined('JPATH_PLATFORM') or die;

/**
 * Abstract observer class to implement the observer design pattern
 *
 * @since       11.1
 * @deprecated  12.3 (Platform) & 4.0 (CMS)
 * @codeCoverageIgnore
 */
abstract class JObserver extends JObject
{
	/**
	 * Event object to observe.
	 *
	 * @var    object
	 * @since  11.1
	 * @deprecated  12.3
	 */
	protected $_subject = null;

	/**
	 * Constructor
	 *
	 * @param   object  &$subject  The object to observe.
	 *
	 * @since   11.1
	 * @deprecated  12.3
	 */
	public function __construct(&$subject)
	{
		// Register the observer ($this) so we can be notified
		$subject->attach($this);

		// Set the subject to observe
		$this->_subject = &$subject;
	}

	/**
	 * Method to update the state of observable objects
	 *
	 * @param   array  &$args  An array of arguments to pass to the listener.
	 *
	 * @return  mixed
	 *
	 * @since   11.1
	 * @deprecated  12.3
	 */
	abstract public function update(&$args);
}

The same content is in 6 releases, Joomla 3.6.3-rc1 to 3.6.5. See them all, or every version of this file.