⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 observer.class.php

📁 Ajax最流行书籍
💻 PHP
字号:
<?php/** * NAJAX Observer file. * * <p>This file defines the {@link NAJAX_Observer} Class.</p> * <p>Example:</p> * <code> * <?php * * require_once('najax.php'); * * class CallbackObserver extends NAJAX_Observer * { * 	function updateObserver($event, $arg) * 	{ * 		print $event . ' called.'; * 	} * } * * NAJAX_Server::addObserver(new CallbackObserver()); * * ... * * ?> * </code> * * @author	Stanimir Angeloff * * @package	NAJAX * * @version	0.4.1.0 * *//** * NAJAX Observer Class. * * <p>To observe NAJAX events you must define your own * classes that extend the {@link NAJAX_Observer} class.</p> * <p>See {@link NAJAX_Observer::updateObserver} for * more information.</p> * <p>Example:</p> * <code> * <?php * * require_once('najax.php'); * * class CallbackObserver extends NAJAX_Observer * { * 	function updateObserver($event, $arg) * 	{ * 		print $event . ' called.'; * 	} * } * * NAJAX_Server::addObserver(new CallbackObserver()); * * ... * * ?> * </code> * * @author		Stanimir Angeloff * * @package		NAJAX * * @version		0.4.1.0 * */class NAJAX_Observer{	/**	 * This method is called when {@link NAJAX_Observable::notifyObservers}	 * is called.	 *	 * <p>You should override this method to accept two parameters - the	 * event name and the event argument.</p>	 * <p>If {@link NAJAX_Observable::notifyObservers} is called without	 * parameters the event name is 'default'.</p>	 * <p>You should also always return a boolean value that indicates	 * the result of the event.</p>	 *	 * @access	public	 *	 * @return	bool	Always true.	 *	 */	function updateObserver()	{		return true;	}}?>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -