Example #1
0
 /**
  * 处理路由信息
  *
  */
 protected function _process()
 {
     $moduleVar = ConfigManager::get('module_var');
     $actionVar = ConfigManager::get('action_var');
     $groupVar = ConfigManager::get('group_var');
     //模块
     if (isset($_GET[$moduleVar])) {
         $this->module = String::processMethodName($_GET[$moduleVar]);
         unset($_GET[$moduleVar]);
     } else {
         if (isset($_POST[$moduleVar])) {
             $this->module = String::processMethodName($_POST[$moduleVar]);
             unset($_POST[$moduleVar]);
         }
     }
     if (!$this->check($this->module)) {
         $this->module = String::processMethodName(ConfigManager::get('default_module'));
     }
     //操作
     if (isset($_GET[$actionVar])) {
         $this->action = String::processMethodName($_GET[$actionVar]);
         unset($_GET[$actionVar]);
     } else {
         if (isset($_POST[$actionVar])) {
             $this->action = String::processMethodName($_POST[$actionVar]);
             unset($_POST[$actionVar]);
         }
     }
     if (!$this->check($this->action)) {
         $this->action = String::processMethodName(ConfigManager::get('default_action'));
     }
     //组
     if (isset($_GET[$groupVar])) {
         $this->group = String::processMethodName($_GET[$groupVar]);
         unset($_GET[$groupVar]);
     } else {
         if (isset($_POST[$groupVar])) {
             $this->group = String::processMethodName($_POST[$groupVar]);
             unset($_POST[$groupVar]);
         }
     }
     if (!$this->check($this->group)) {
         $this->group = null;
     }
 }
Example #2
0
 /**
  * 获取实体类的所有的属性字段
  *
  * @return array 实体类的所有的属性字段
  */
 public function getProperty()
 {
     $all = get_object_vars($this);
     $actProperty = array();
     foreach ($all as $property => $val) {
         if (String::startWith($property, $this->fieldPrefix) && strcasecmp($property, $this->fieldPrefix) !== 0) {
             $actProperty[] = $property;
         }
     }
     return $actProperty;
 }