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; }
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();
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); }
/** * 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; } }