<?php
namespace JExtstore\Component\JRealtimeAnalytics\Administrator\Framework\Model;
/**
 *
 * @package JREALTIMEANALYTICS::FRAMEWORK::administrator::components::com_jrealtimeanalytics
 * @subpackage framework
 * @subpackage model
 * @author Joomla! Extensions Store
 * @copyright (C) 2013 - Joomla! Extensions Store
 * @license GNU/GPLv2 http://www.gnu.org/licenses/gpl-2.0.html
 */
defined ( '_JEXEC' ) or die ( 'Restricted access' );

/**
 * Observable model responsibilities
 *
 * @package JREALTIMEANALYTICS::FRAMEWORK::administrator::components::com_jrealtimeanalytics
 * @subpackage framework
 * @subpackage model
 * @since 2.0
 */
interface IObservable {
	/**
	 * Update each attached observer object and return an array of their return values
	 *
	 * @return array Array of return values from the observers
	 */
	public function notify();
	
	/**
	 * Attach an observer object
	 *
	 * @param Observer $observer
	 *        	An observer object to attach
	 *        	
	 * @return void
	 */
	public function attach(Observer $observer);
	
	/**
	 * Detach an observer object
	 *
	 * @param Observer $observer
	 *        	An observer object to detach.
	 *        	
	 * @return boolean True if the observer object was detached.
	 */
	public function detach(Observer $observer);
	
	/**
	 * Method to get model state variables
	 *
	 * @param string $property        	
	 * @param mixed $default        	
	 *
	 * @return object The property where specified, the state object where omitted
	 */
	public function getState($property = null, $default = null);
	
	/**
	 * Method to set model state variables
	 *
	 * @param string $property        	
	 * @param mixed $value        	
	 *
	 * @return mixed The previous value of the property or null if not set.
	 */
	public function setState($property, $value = null);
}