Ejemplo n.º 1
0
 public function execute()
 {
     $validator = new HuiValidatorHelper();
     $validator->validate();
     $auth = HuiAuthHelperFactory::getAuthHelper();
     if ($auth->auth($this->request, $this->response)) {
         foreach ($GLOBALS['gEnv']['runtime']['disp']['hui'] as $disp => $values) {
             if (isset($this->commands[$disp][$values['eventname']])) {
                 import($this->commands[$disp][$values['eventname']]);
                 $classname = substr($this->commands[$disp][$values['eventname']], strrpos($this->commands[$disp][$values['eventname']], '.') + 1);
                 $command = new $classname($this);
                 $command->execute();
             }
         }
     }
     $hui = new Hui($GLOBALS['gEnv']['root']['db']);
     $hui->addChild(new HuiXml('def', array('definition' => $this->response->getContent())));
     $hui->render();
 }