Example #1
0
 public function init()
 {
     $components = F_Helper_Array::MergeArray($this->base_components, Flow::$cfg);
     // 初始化所有组件
     $this->setComponent('request', $components["components"]['request']);
     $this->setComponent('url_router', $components["components"]['url_router']);
 }
Example #2
0
 public function init()
 {
     $path = dirname($_SERVER["SCRIPT_NAME"]);
     $this->basePath = str_replace("\\", "/", $path);
     $components = F_Helper_Array::MergeArray($this->baseComponents, Flow::$cfg);
     // 初始化所有组件
     foreach ($this->baseComponents["components"] as $key => $arr) {
         $this->setComponent($key, $components["components"][$key]);
     }
 }
Example #3
0
 public function init()
 {
     $this->_params = $_GET;
     $this->_params = array_merge($_POST, $this->_params);
     $this->_safeParams = F_Helper_Array::htmlspecialchars($this->_params);
     if (isset(Flow::$cfg['safe_input']) && Flow::$cfg['safe_input']) {
         unset($_GET);
         unset($_POST);
         unset($_REQUEST);
     }
 }
Example #4
0
 /**
  * 读取和合并配置文件里面的内容
  * @param array $config
  */
 private function _loadcfg()
 {
     // 合并配置文件
     self::$cfg = F_Helper_Array::MergeArray(self::$cfg, $this->_includeCfg(APP_PATH . "/config/"));
     // 合并ENV里面的配置
     if (!empty(self::$cfg['base_env'])) {
         self::$cfg = F_Helper_Array::MergeArray(self::$cfg, $this->_includeCfg(APP_PATH . "/config/" . self::$cfg['base_env'] . "/"));
     }
 }