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

📄 storage.class.php

📁 Ajax最流行书籍
💻 PHP
字号:
<?php/** * XOAD_Cache Storage File. * * <p>This file defines the {@link XOAD_Cache_Storage} Class.</p> * <p>You should not include this file directly. It is used * by {@link XOAD_Cache} extension.</p> * * @author		Stanimir Angeloff * * @package		XOAD * * @subpackage	XOAD_Cache * * @version		0.6.0.0 * *//** * XOAD_Cache Storage Class. * * <p>This class is used as base class for all XOAD_Cache * storage providers.</p> * <p>Example XOAD_Cache provider: {@link XOAD_Cache_Storage_Files}.</p> * * @author		Stanimir Angeloff * * @package		XOAD * * @subpackage	XOAD_Cache * * @version		0.6.0.0 * */class XOAD_Cache_Storage{	/**	 * Creates a new instance of the {@link XOAD_Cache_Storage} class.	 *	 * @access	public	 *	 * @param	string	$dsn	The data source name and parameters to use	 *							when creating the instance.	 * 	 */	function XOAD_Cache_Storage($dsn = null)	{		if ( ! empty($dsn)) {			$pairs = explode(';', $dsn);			foreach ($pairs as $pair) {				if ( ! empty($pair)) {					list($key, $value) = explode('=', $pair, 2);					$this->$key = $value;				}			}		}	}	/** 	 * Generates an unique ID from the given data.	 *	 * @access	public	 *	 * @param	string	$data	The data to use when generating the ID.	 *	 * @return	string	The unique ID from the given data.	 *	 */	function generateID($data = null)	{		return md5($data);	}	/**	 * Abstract base class method.	 *	 * <p>Successor classes should override this method.</p>	 *	 * @access	public	 *	 * @return	bool	 *	 */	function collectGarbage()	{		return true;	}	/**	 * Abstract base class method.	 *	 * <p>Successor classes should override this method.</p>	 *	 * @param	mixed	$id	The ID of the cached data.	 *	 * @access	public	 *	 * @return	mixed	 *	 */	function load($id = null)	{		return null;	}	/**	 * Abstract base class method.	 *	 * <p>Successor classes should override this method.</p>	 *	 * @access	public	 *	 * @param	mixed	$id			The ID to use when saving the data.	 *	 * @param	int		$expires	The lifetime time in seconds for the	 *								cached data.	 *	 * @param	mixed	$data		The data to cache.	 *	 * @return	bool	 *	 */	function save($id = null, $expires = null, $data = null)	{		return true;	}}?>

⌨️ 快捷键说明

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