Exemple #1
0
 protected static function _runModuleInstall($module)
 {
     $moduleLocationDir = GMP_MODULES_DIR;
     if (!empty($module['ex_plug_dir'])) {
         $moduleLocationDir = utilsGmp::getPluginDir($module['ex_plug_dir']);
     }
     if (is_dir($moduleLocationDir . $module['code'])) {
         importClassGmp($module['code'], $moduleLocationDir . $module['code'] . DS . 'mod.php');
         $moduleClass = toeGetClassNameGmp($module['code']);
         $moduleObj = new $moduleClass($m);
         if ($moduleObj) {
             $moduleObj->install();
         }
     }
 }
 protected static function _runModuleInstall($module, $action = 'install')
 {
     $moduleLocationDir = GMP_MODULES_DIR;
     if (!empty($module['ex_plug_dir'])) {
         $moduleLocationDir = utilsGmp::getPluginDir($module['ex_plug_dir']);
     }
     if (is_dir($moduleLocationDir . $module['code'])) {
         if (!class_exists($module['code'] . strFirstUp(GMP_CODE))) {
             importClassGmp($module['code'], $moduleLocationDir . $module['code'] . DS . 'mod.php');
         }
         $moduleClass = toeGetClassNameGmp($module['code']);
         $moduleObj = new $moduleClass($module);
         if ($moduleObj) {
             $moduleObj->{$action}();
         }
     }
 }
Exemple #3
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();
Exemple #4
0
 /**
  * Method to create class of module helper
  * @return class helperGmp 
  */
 protected function _createHelper()
 {
     if ($this->_helper) {
         return true;
     }
     if (file_exists($this->getModDir() . 'helper.php')) {
         $helper = $this->getCode() . 'Helper';
         importClassGmp($helper, $this->getModDir() . 'helper.php');
         if (class_exists($helper)) {
             $this->_helper = new $helper($this->_code);
             $this->_helper->init();
             return true;
         }
     }
 }
Exemple #5
0
 protected function _extractTable($tableName, $tablesDir = GMP_TABLES_DIR)
 {
     importClassGmp('noClassNameHere', $tablesDir . $tableName . '.php');
     $this->_tables[$tableName] = tableGmp::_($tableName);
     //var_dump($tableName, $this->_tables[$tableName]);
 }
Exemple #6
0
importClassGmp('viewGmp');
importClassGmp('controllerGmp');
importClassGmp('helperGmp');
importClassGmp('tabGmp');
importClassGmp('dispatcherGmp');
importClassGmp('fieldGmp');
importClassGmp('tableGmp');
importClassGmp('frameGmp');
importClassGmp('langGmp');
importClassGmp('reqGmp');
importClassGmp('uriGmp');
importClassGmp('htmlGmp');
importClassGmp('responseGmp');
importClassGmp('fieldAdapterGmp');
importClassGmp('validatorGmp');
importClassGmp('errorsGmp');
importClassGmp('utilsGmp');
importClassGmp('modInstallerGmp');
importClassGmp('wpUpdater');
importClassGmp('installerDbUpdaterGmp');
installerGmp::update();
errorsGmp::init();
dispatcherGmp::doAction('onBeforeRoute');
frameGmp::_()->parseRoute();
dispatcherGmp::doAction('onAfterRoute');
dispatcherGmp::doAction('onBeforeInit');
frameGmp::_()->init();
dispatcherGmp::doAction('onAfterInit');
dispatcherGmp::doAction('onBeforeExec');
frameGmp::_()->exec();
dispatcherGmp::doAction('onAfterExec');
Exemple #7
0
 private function _connectCsvLib()
 {
     importClassGmp('filegeneratorGmp');
     importClassGmp('csvgeneratorGmp');
 }