diogenes.script.inc.php

00001 <?php
00002 /*
00003  * Copyright (C) 2003-2006 Polytechnique.org
00004  * http://opensource.polytechnique.org/
00005  *
00006  * This program is free software; you can redistribute it and/or modify
00007  * it under the terms of the GNU General Public License as published by
00008  * the Free Software Foundation; either version 2 of the License, or
00009  * (at your option) any later version.
00010  *
00011  * This program is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  * GNU General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU General Public License
00017  * along with this program; if not, write to the Free Software
00018  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00019  */
00020 
00021 require_once 'Barrel.php';
00022 
00025 class Diogenes_Script
00026 {
00027   function Diogenes_Script($alias,$login)
00028   {
00029     $this->alias = $alias;
00030     $this->login = $login;
00031     $this->barrel = new Diogenes_Barrel($alias);
00032     if (!$this->barrel->alias) {
00033         $this->kill("unknown barrel requested : $alias");
00034     }
00035   }
00036 
00037   function kill($msg)
00038   {
00039     echo "KILL: $msg\n";
00040     exit(1);
00041   }
00042   
00043   function info($msg)
00044   {
00045     echo "INFO: $msg\n";
00046   }
00047 
00048   function getRcs()
00049   {
00050     global $globals;
00051     return new $globals->rcs($this,$this->alias,$this->login);
00052   }
00053   
00054   function log($action, $data="")
00055   {
00056     echo "LOG: $action $data\n";
00057   }
00058 }
00059 
00060 ?>

Generated on Fri Jan 11 01:20:08 2008 for Diogenes by  doxygen 1.5.1