Location: PHPKode > scripts > Event > event/EventCaller.php
<?php

/**
 * ACE - Advanced Content Environment Framework
 *
 * LICENSE
 *
 * This is a part of ACE - Advanced Content Environment Framework,
 * any usage without permission of the author is prohibited.
 * Licence can be obtained by sending email to hide@address.com
 *
 * @category   ACE
 * @package    ACE
 * @author     Michał Szpakowski
 * @copyright  Copyright (c) 2007 Michał Szpakowski
 * @license    Limited, email hide@address.com
 */

/**
 * @category   ACE
 * @package    Event
 * @copyright  Copyright (c) 2007 Michał Szpakowski
 * @license    Limited, email hide@address.com
 */

Class EventCaller
{
	/**
	 * Name of event (key in {@link Event::__events}
	 *
	 * @var string
	 * @access public
	 */
	private $__event;
	
	/**
	 * Bind event name to the {@link EventCaller::__event} and caller
	 * to the {@link Event::__caller}. Binding is done only once.
	 *
	 * @param unknown_type $name
	 * @return unknown
	 */
	public final function bind($name)
	{
		if (!isset($this->__event))
		{
			$this->__event = $name;
			return true;
		}
		return false;
	}
	
	/**
	 * Get the event name stored in {@link EventCaller::__event}
	 *
	 * @return unknown
	 */
	public function getEvent()
	{
		return $this->__event;
	}
}

?>
Return current item: Event