From 107d742e8e0e334f1196659fd2e18b707173b950 Mon Sep 17 00:00:00 2001 From: Jeremy Laine Date: Fri, 21 Jul 2006 21:07:07 +0000 Subject: [PATCH] add class for facilitating scripts --- include/diogenes.script.inc.php | 60 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 include/diogenes.script.inc.php diff --git a/include/diogenes.script.inc.php b/include/diogenes.script.inc.php new file mode 100644 index 0000000..08afa4d --- /dev/null +++ b/include/diogenes.script.inc.php @@ -0,0 +1,60 @@ +alias = $alias; + $this->login = $login; + $this->barrel = new Diogenes_Barrel($alias); + if (!$this->barrel->alias) { + $this->kill("unknown barrel requested : $alias"); + } + } + + function kill($msg) + { + echo "KILL: $msg\n"; + exit(1); + } + + function info($msg) + { + echo "INFO: $msg\n"; + } + + function getRcs() + { + global $globals; + return new $globals->rcs($this,$this->alias,$this->login); + } + + function log($action, $data="") + { + echo "LOG: $action $data\n"; + } +} + +?> -- 2.1.4