示例#1
0
 public static function appendErrorsContent($content)
 {
     if (!self::$displayed && !empty(self::$current)) {
         $content = '<div class="toeErrorMsg">' . implode('<br />', self::$current) . '</div>' . $content;
         self::$displayed = true;
     }
     return $content;
 }
示例#2
0
importClassGmp('helperGmp');
importClassGmp('dispatcherGmp');
importClassGmp('fieldGmp');
importClassGmp('tableGmp');
importClassGmp('frameGmp');
/**
 * @deprecated since version 1.0.1
 */
importClassGmp('langGmp');
importClassGmp('reqGmp');
importClassGmp('uriGmp');
importClassGmp('htmlGmp');
importClassGmp('responseGmp');
importClassGmp('fieldAdapterGmp');
importClassGmp('validatorGmp');
importClassGmp('errorsGmp');
importClassGmp('utilsGmp');
importClassGmp('modInstallerGmp');
importClassGmp('installerDbUpdaterGmp');
importClassGmp('dateGmp');
/**
 * Check plugin version - maybe we need to update database, and check global errors in request
 */
installerGmp::update();
errorsGmp::init();
/**
 * Start application
 */
frameGmp::_()->parseRoute();
frameGmp::_()->init();
frameGmp::_()->exec();
示例#3
0
 public function __call($name, $arguments)
 {
     $controller = $this->getController();
     if (method_exists($controller, $name)) {
         //try to find this method in controller
         return $this->getController()->{$name}(isset($arguments[0]) ? $arguments[0] : NULL, isset($arguments[0]) ? $arguments[0] : NULL, isset($arguments[0]) ? $arguments[0] : NULL);
     } elseif ($controller) {
         //try to find this method in model
         $model = $controller->getModel();
         if (method_exists($model, $name)) {
             return $this->getController()->{$name}(isset($arguments[0]) ? $arguments[0] : NULL, isset($arguments[0]) ? $arguments[0] : NULL, isset($arguments[0]) ? $arguments[0] : NULL);
         }
     }
     errorsGmp::push(langGmp::_(array('Module', $this->_code, 'method', $name, 'undefined')), errorsGmp::FATAL);
 }
示例#4
0
 /**
  * Display all errors for module installer, must be used ONLY if You realy need it
  */
 public static function displayErrors($exit = true)
 {
     $errors = errorsGmp::get(errorsGmp::MOD_INSTALL);
     foreach ($errors as $e) {
         echo '<b style="color: red;">' . $e . '</b><br />';
     }
     if ($exit) {
         exit;
     }
 }