Example #1
0
 static function get_single_file($full_plugin_path)
 {
     $f = new File(self::DEFAULT_DIR . $full_plugin_path . self::DEFAULT_EXTENSION);
     if (!$f->exists()) {
         throw new IOException("Il plugin " . $full_plugin_path . " non e' stato trovato.");
     }
     return $f->getIncludePath();
 }
 function execute()
 {
     $nome_script = $this->nome_script;
     $parameters = $this->parameters;
     if (self::$dummy_mode) {
         echo "Run script if found : " . $this->module_dir->getPath() . "/script/" . $nome_script . ".php<br />";
         return;
     }
     extract($parameters);
     $f = new File($this->module_dir->getPath() . "/script/" . $nome_script . ".php");
     if ($f->exists()) {
         include $f->getIncludePath();
         return true;
     } else {
         return false;
     }
 }
Example #3
0
 public function run_script_if_found($nome_script, $parameters = array())
 {
     if (self::$dummy_mode) {
         echo "Run script if found : " . $this->module_dir->getPath() . "/script/" . $nome_script . ".php<br />";
         return;
     }
     extract($parameters);
     $f = new File($this->module_dir->getPath() . "/script/" . $nome_script . ".php");
     if ($f->exists()) {
         include $f->getIncludePath();
         return true;
     } else {
         return false;
     }
 }