Esempio n. 1
0
 public function parseUrl($url)
 {
     $data = array();
     $urlData = new DataMap($data);
     $query = parse_url($url, PHP_URL_QUERY);
     if ($query !== null) {
         parse_str($query, $tmp);
         foreach ($tmp as $key => $value) {
             $urlData->set($key, $value);
         }
     }
     if ($urlData->get($this->cKey, '') == '') {
         $urlData->set($this->cKey, $this->defaultC);
     }
     if ($urlData->get($this->aKey, '') == '') {
         $urlData->set($this->aKey, $this->defaultA);
     }
     return $urlData;
 }
Esempio n. 2
0
 /**
  * 类自动加载器
  *
  * @param DataMap $config
  *        	配置对象
  */
 public function __construct(DataMap $config)
 {
     $this->mvcClasspath = $config->get('mvc_class_path');
     $this->appClasspath = $config->get('app_class_path');
     $this->mvcExtpath = $config->get('mvc_ext_path');
     $this->appExtpath = $config->get('app_ext_path');
     $this->mvcExtRoute = $config->get('mvc_ext_route');
     $this->appExtRoute = $config->get('app_ext_route');
 }