Beispiel #1
0
 public function runController($controller_name)
 {
     $basePath = _UN_CONTROLLERS_URI_;
     //_UN_CONTROLLERS_URI_
     if ($controller_name == '') {
         return false;
     }
     $CLASS_NAME = UN_ObjectModel::getClass($controller_name);
     if (!$CLASS_NAME) {
         die('Controller name "' . $controller_name . '" not found in db table "class_install!"');
     }
     if (isset($CLASS_NAME::$un_definition['controller_call']) && $CLASS_NAME::$un_definition['controller_call']) {
         $t_path = $basePath . $CLASS_NAME::$un_definition['controller_call'] . '.php';
     } else {
         $t_path = $basePath . 'un_objects_common.inc' . '.php';
     }
     if (file_exists($t_path)) {
         $this->controller_name = $controller_name;
         require $t_path;
     } else {
         die('Controller file not found: ' . $t_path);
     }
 }