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

📄 meta.class.php

📁 ajax修炼之道源代码。很难下到的。现在奉献给大家。
💻 PHP
字号:
<?php/** * XOAD Meta file. * * <p>This file defines the {@link XOAD_Meta} Class.</p> * <p>This class is used internally only.</p> * * @author	Stanimir Angeloff * * @package	XOAD * * @version	0.6.0.0 * *//** * XOAD Meta Class. * * <p>This class is used to extend classes with meta * data, such as private methods and/or variables.</p> * <p>You should never use this class directly. * Rather, use the {@link XOAD_Utilities} class.</p> * * @access		public * * @author		Stanimir Angeloff * * @package		XOAD * * @version		0.6.0.0 * */class XOAD_Meta extends XOAD_Observable{	/**	 *	 * @access	private	 *	 * @var		array	 *	 */	var $publicMethods;	/**	 *	 * @access	private	 *	 * @var		array	 *	 */	var $privateMethods;	/**	 *	 * @access	private	 *	 * @var		array	 *	 */	var $publicVariables;	/**	 *	 * @access	private	 *	 * @var		array	 *	 */	var $privateVariables;	/**	 *	 * @access	private	 *	 * @var		array	 *	 */	var $methodsMap;	/**	 *	 * @access	public	 *	 * @return	void	 *	 */	function setPublicMethods($methods)	{		$methodsType = XOAD_Utilities::getType($methods);		if ($methodsType == 'string') {			$this->publicMethods = array(XOAD_Utilities::caseConvert($methods));		} else if (($methodsType == 's_array') || ($methodsType == 'a_array')) {			$this->publicMethods = array_map(array('XOAD_Utilities', 'caseConvert'), $methods);		} else {			$this->publicMethods = null;		}	}	/**	 *	 * @access	public	 *	 * @return	void	 *	 */	function setPrivateMethods($methods)	{		$methodsType = XOAD_Utilities::getType($methods);		if ($methodsType == 'string') {			$this->privateMethods = array(XOAD_Utilities::caseConvert($methods));		} else if (($methodsType == 's_array') || ($methodsType == 'a_array')) {			$this->privateMethods = array_map(array('XOAD_Utilities', 'caseConvert'), $methods);		} else {			$this->privateMethods = null;		}	}	/**	 *	 * @access	public	 *	 * @return	void	 *	 */	function setPublicVariables($variables)	{		$variablesType = XOAD_Utilities::getType($variables);		if ($variablesType == 'string') {			$this->publicVariables = array(XOAD_Utilities::caseConvert($variables));		} else if (($variablesType == 's_array') || ($variablesType == 'a_array')) {			$this->publicVariables = array_map(array('XOAD_Utilities', 'caseConvert'), $variables);		} else {			$this->publicVariables = null;		}	}	/**	 *	 * @access	public	 *	 * @return	void	 *	 */	function setPrivateVariables($variables)	{		$variablesType = XOAD_Utilities::getType($variables);		if ($variablesType == 'string') {			$this->privateVariables = array(XOAD_Utilities::caseConvert($variables));		} else if (($variablesType == 's_array') || ($variablesType == 'a_array')) {			$this->privateVariables = array_map(array('XOAD_Utilities', 'caseConvert'), $variables);		} else {			$this->privateVariables = null;		}	}	/**	 *	 * @access	public	 *	 * @return	void	 *	 */	function setMethodsMap($methodsMap)	{		$methodsMapType = XOAD_Utilities::getType($methodsMap);		if ($methodsMapType == 'string') {			$this->methodsMap = array(XOAD_Utilities::caseConvert($methodsMap) => $methodsMap);		} else if (($methodsMapType == 's_array') || ($methodsMapType == 'a_array')) {			$map = array();			foreach ($methodsMap as $method) {				$map[XOAD_Utilities::caseConvert($method)] = $method;			}			$this->methodsMap = $map;		} else {			$this->methodsMap = null;		}	}	/**	 *	 * @access	public	 *	 * @return	bool	 *	 */	function isPublicMethod($methodName)	{		if ( ! empty($this->privateMethods)) {			if (in_array(XOAD_Utilities::caseConvert($methodName), $this->privateMethods)) {				return false;			}		}		if ( ! empty($this->publicMethods)) {			if ( ! in_array(XOAD_Utilities::caseConvert($methodName), $this->publicMethods)) {				return false;			}		}		return true;	}	/**	 *	 * @access	public	 *	 * @return	bool	 *	 */	function isPublicVariable($variableName)	{		if ( ! empty($this->privateVariables)) {			if (in_array(XOAD_Utilities::caseConvert($variableName), $this->privateVariables)) {				return false;			}		}		if ( ! empty($this->publicVariables)) {			if ( ! in_array(XOAD_Utilities::caseConvert($variableName), $this->publicVariables)) {				return false;			}		}		return true;	}	/**	 *	 * @access	public	 *	 * @return	string	 *	 */	function findMethodName($methodName)	{		if ( ! empty($this->methodsMap)) {			$name = XOAD_Utilities::caseConvert($methodName);			if (isset($this->methodsMap[$name])) {				return $this->methodsMap[$name];			}		}		return $methodName;	}	/**	 * Adds a {@link XOAD_Meta} events observer.	 *	 * @access	public	 *	 * @param	mixed	$observer	The observer object to add (must extend {@link XOAD_Observer}).	 *	 * @return	string	true on success, false otherwise.	 *	 * @static	 *	 */	function addObserver(&$observer)	{		return parent::addObserver($observer, 'XOAD_Meta');	}	/**	 *	 * @access	public	 *	 * @return	bool	 *	 */	function notifyObservers($event = 'default', $arg = null)	{		return parent::notifyObservers($event, $arg, 'XOAD_Meta');	}}?>

⌨️ 快捷键说明

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