예제 #1
0
 public function get($key, $filter_type = 'safe', $default_value = null)
 {
     // 	    pre(parent::get(self::args));exit();
     if (is_int($key)) {
         //load args
         $findkey = sprintf('%s%d', self::args, $key);
         if ($this->exists($findkey)) {
             return parent::get($findkey);
         } else {
             $args = parent::get(self::args);
             if (isset($args[$key])) {
                 $value = $args[$key];
                 $value = $this->applyFilter($value, $filter_type, $default_value);
             } else {
                 $value = null;
             }
             return parent::set($findkey, $value);
         }
     }
     if ($this->exists($key)) {
         return parent::get($key);
     } else {
         if (!isset($_REQUEST[$key])) {
             return parent::set($key, $default_value);
         }
         $value = $_REQUEST[$key];
         $value = $this->applyFilter($value, $filter_type, $default_value);
         return parent::set($key, $value);
     }
 }
예제 #2
0
 protected function getLayoutConfig()
 {
     static $layout;
     if (!isset($layout)) {
         $config = Config::getInstance();
         $layout = new AdvancedContainer();
         foreach ($config->get('layout') as $key => $value) {
             $layout->set($key, $value);
         }
     }
     return $layout;
 }