/** * 初始化session环境 * * @return bool */ public static function init() { if (self::$start) { return true; } /**@type \handler\ISessionHandler $session*/ $session = App::getConfig()->getSessionHandler(); if (!$session->isDisabled()) { session_set_save_handler(array($session, 'open'), array($session, 'close'), array($session, 'read'), array($session, 'write'), array($session, 'destroy'), array($session, 'gc')); } session_name('XSSSESSID'); session_start(); self::$start = true; return true; }
/** * 获取数据表名称 * * @param string $tablename * <p>如果没有给定数据表名称则返回setTableName设置的值</p> * @return string */ protected final function getTableName($tablename = '') { if ($tablename != '') { $config = App::getConfig()->getMysqlSetting(); $prefix = $config['prefix']; return str_replace('#', $prefix, $tablename); } return $this->table_name; }
/** * 构造函数 */ public function __construct() { $this->servers = App::getConfig()->getSmtpServer(); }
public function getBasePath() { return App::getConfig()->getBasePath(); }
public function __construct() { $this->storage = App::getConfig()->getStorageHandler(); }