/** * 构造方法 * @param object app * @return null */ function __construct(&$app) { $this->app = $app; if (substr(PHP_SAPI_NAME(), 0, 3) !== 'cli' && base_rpc_service::$is_start != true) { $this->_render = kernel::single('desktop_controller'); } $this->_params = array(); $this->_extra_view = array('archive' => 'finder/extra_view.html'); }
/** * 构造方法 * @param object app * @return null */ function __construct(&$app) { $this->app = $app; if (substr(PHP_SAPI_NAME(), 0, 3) !== 'cli' && base_rpc_service::$is_start != true) { if (isset($this->analysis_config)) { $this->pagedata['time_shortcut'] = $this->analysis_config['setting']['time_shortcut']; } } $this->_params = array(); $this->_service = get_class($this); $this->_extra_view = array('ectools' => 'ectools/analysis/extra_view.html'); $this->analysis_config = app::get('ectools')->getConf('analysis_config'); }
/** * 构造方法 * @param object app * @return null */ function __construct(&$app) { $this->app = $app; if (substr(PHP_SAPI_NAME(), 0, 3) !== 'cli') { $this->_render = kernel::single('desktop_controller'); if (isset($this->analysis_config)) { $this->_render->pagedata['time_shortcut'] = $this->analysis_config['setting']['time_shortcut']; } } $this->_params = array(); $this->_service = get_class($this); $this->_extra_view = array('ectools' => 'analysis/extra_view.html'); $this->analysis_config = app::get('ectools')->getConf('analysis_config'); }
function isCli() { return substr(PHP_SAPI_NAME(), 0, 3) == 'cli'; }
/** * 得到当前登陆用户的信息 * @param null * @return array 用户信息 */ public function get_current_member() { if (!$this->app->member_id) { # 解决在命令行执行时, 因为没有session会报诡异问题的bug if (substr(PHP_SAPI_NAME(), 0, 3) !== 'cli') { kernel::single('base_session')->start(); $this->app->member_id = $_SESSION['account'][pam_account::get_account_type($this->app->app_id)]; } } if ($this->member_info) { return $this->member_info; } #获取会员基本信息 jiaolei return $this->get_member_info($this->app->member_id); }
/** * Check CLI env * @return string */ function isCli() { return strtoupper(substr(PHP_SAPI_NAME(), 0, 3) === 'CLI'); }