fonction loaded pour les plugins
authordj3c1t <dj3c1t@free.fr>
Tue, 24 Dec 2013 13:54:55 +0000 (14:54 +0100)
committerdj3c1t <dj3c1t@free.fr>
Tue, 24 Dec 2013 13:54:55 +0000 (14:54 +0100)
mw/env/modules/mw_env_plugins.php
mw/mw_app.php

index fefbd04..b9fe042 100644 (file)
       if(method_exists($impl, $method)) return $impl->$method($this);
     }
 
+    function loaded_plugins(){
+      if($plugins = $this->plugins()){
+        foreach($plugins as $plugin_name => $plugin){
+          $plugin["impl"]->loaded($this);
+        }
+      }
+    }
+
     # ---------------------------------------------------------------------------------
     #                                                                              impl
     #
       return "";
     }
 
+    function loaded($env){
+    }
+
     function install($env){
       return true;
     }
index a488bce..38d094d 100644 (file)
       $env->load_versions();
       $env->load_config($this->bdd, $this->config);
       $env->init();
+      $env->loaded_plugins();
       if(($res = $env->init_data_upgrades()) !== true){
         $this->error("impossible de lire les upgrades. ".$res);
         return false;