Exemplo 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;
 }
Exemplo n.º 2
0
 private function __construct(DataMap $config)
 {
     $distConf = array_merge($this->getMvcConfig(), $config->toArray());
     $this->appConfig = new DataMap($distConf);
     spl_autoload_register(array(new Classloader($this->appConfig), 'loadClass'));
 }