Esempio n. 1
0
 /**
  * Get active modules and return a array of all active module instance
  *
  * the `extend_module` method should be executed before to ensure that
  * all compatible modules will be loaded
  *
  * @return array
  */
 public function load_module($parse_module)
 {
     if ($parse_module) {
         $this->extend_module();
     }
     $modules = parent::g_module();
     if ($parse_module) {
         $this->extend_module(array_map(function ($a) {
             return $a['module_name'];
         }, $modules));
     }
     $active_mods = array();
     foreach ($modules as $mod) {
         $modClass = 'plugins_' . $mod['module_name'] . '_cartpay';
         $active_mods[$mod['module_name']] = $this->get_call_class($modClass);
     }
     return $active_mods;
 }