private static function _loadConfig() { if (!self::$_config) { Application::getInstance()->config->load('NoticeAdapter'); self::$_config = Application::getInstance()->config->get('NoticeAdapter'); } }
function __construct() { if (self::$_allowInstance) { Application::getInstance()->config->load('ShellConfig'); $this->_config = Application::getInstance()->config->get('ShellConfig'); } else { Exception::throwException(101, ['FindConfig']); } }
function __construct() { Application::getInstance()->config->load('ShellConfig'); $config = Application::getInstance()->config->get('ShellConfig'); if (!empty($config) && isset($config['shell_cmd']) && !empty($config['shell_cmd'])) { $this->_shellCmd = $config['shell_cmd']; } else { Exception::throwException(10007); } }
public function handle(array $params = null) { $tokenName = Application::getInstance()->config->get('App.cookie_prefix') . Application::getInstance()->config->get('App.token_cookie_name'); $token = Input::cookie($tokenName); if (!empty($token)) { $result = Account::where('ucenter_token', $token)->limit(1)->get(); if (!empty($result)) { $result = $result[0]; if (time() < $result->token_expired) { Request::addParameter('currentAccount', $result); } } } }