• Main Page
  • Related Pages
  • Namespaces
  • Data Structures
  • Files
  • File List
  • Globals

classes/class.ilMetaTechnicalRequirement.php

Go to the documentation of this file.
00001 <?php
00002 /*
00003         +-----------------------------------------------------------------------------+
00004         | ILIAS open source                                                           |
00005         +-----------------------------------------------------------------------------+
00006         | Copyright (c) 1998-2001 ILIAS open source, University of Cologne            |
00007         |                                                                             |
00008         | This program is free software; you can redistribute it and/or               |
00009         | modify it under the terms of the GNU General Public License                 |
00010         | as published by the Free Software Foundation; either version 2              |
00011         | of the License, or (at your option) any later version.                      |
00012         |                                                                             |
00013         | This program is distributed in the hope that it will be useful,             |
00014         | but WITHOUT ANY WARRANTY; without even the implied warranty of              |
00015         | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the               |
00016         | GNU General Public License for more details.                                |
00017         |                                                                             |
00018         | You should have received a copy of the GNU General Public License           |
00019         | along with this program; if not, write to the Free Software                 |
00020         | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA. |
00021         +-----------------------------------------------------------------------------+
00022 */
00023 
00034 class ilMetaTechnicalRequirement
00035 {
00036         var $ilias;
00037         var $type;
00038         var $name;
00039         var $min_version;
00040         var $max_version;
00041 
00042 
00049         function ilMetaTechnicalRequirement($a_type)
00050         {
00051                 global $ilias;
00052 
00053                 $this->type = $a_type;
00054         }
00055 
00061         function setType($a_type)
00062         {
00063                 $this->type = $a_type;
00064         }
00065 
00069         function getType()
00070         {
00071                 return $this->type;
00072         }
00073 
00082         function setName($a_name)
00083         {
00084                 $this->name = $a_name;
00085         }
00086 
00090         function getName()
00091         {
00092                 return $this->name;
00093         }
00094 
00100         function setMinVersion($a_min_version)
00101         {
00102                 $this->min_version = $a_min_version;
00103         }
00104 
00108         function getMinVersion()
00109         {
00110                 return $this->min_version;
00111         }
00112 
00118         function setMaxVersion($a_max_version)
00119         {
00120                 $this->max_version = $a_max_version;
00121         }
00122 
00126         function getMaxVersion()
00127         {
00128                 return $this->max_version;
00129         }
00130 
00131         function getXML()
00132         {
00133                 $xml = "<Requirement>";
00134                 $xml.= "<Type>";
00135 
00136                 $min = ($this->getMinVersion != "")
00137                         ? "MinimumVersion=\"".$this->getMinVersion()."\""
00138                         : "";
00139                 $max = ($this->getMaxVersion != "")
00140                         ? "MaximumVersion=\"".$this->getMaxVersion()."\""
00141                         : "";
00142 
00143                 switch ($this->getType())
00144                 {
00145                         case "OperatingSystem":
00146                                 $xml.= "<OperatingSystem Name=\"".$this->getName()."\" $min $max>";
00147                                 break;
00148 
00149                         case "Browser":
00150                                 $xml.= "<Browser Name=\"".$this->getName()."\" $min $max>";
00151                                 break;
00152 
00153                         default:
00154                                 return false;
00155                 }
00156 
00157                 $xml.= "</Type>";
00158                 $xml.= "</Requirement>";
00159 
00160                 return $xml;
00161         }
00162 
00163 }
00164 ?>

Generated on Fri Dec 13 2013 09:06:34 for ILIAS Release_3_4_x_branch .rev 46804 by  doxygen 1.7.1