public function HuiDispatcher($dispName) { if (strlen($dispName)) { $this->mName = $dispName; } else { import('com.solarix.ampoliros.io.log.Logger'); $log = new Logger(AMP_LOG); $log->LogEvent('ampoliros.hui_library.huidispatcher_class.huidispatcher', 'Empty dispatcher name', LOGGER_ERROR); } $this->mDispatched = false; import('com.solarix.ampoliros.hui.helpers.HuiValidatorHelper'); HuiValidatorHelper::validate(); }
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(); }