00001 <?php
00007 include_once("core/modules/moduleinformation/IModuleInfoPerms.class.php");
00008
00013 class ModuleInfoXmlPermission extends IModuleInfoPerms
00014 {
00015
00016 var $name;
00017 var $screennames;
00018 var $descriptions;
00019
00020
00021 var $tree;
00022
00023
00024
00025 function ModuleInfoXmlPermission($tree)
00026 {
00027 $this->tree = $tree;
00028 $this->_ProcessTree();
00029 }
00030
00031 function _ProcessTree()
00032 {
00033 $this->name = $this->tree["attributes"]["name"];
00034
00035 if (count($this->tree["children"]) > 0)
00036 {
00037 foreach ($this->tree["children"] as $childtree)
00038 {
00039 $lang = $childtree["attributes"]["lang"];
00040 if (!$childtree["attributes"]["lang"])
00041 $lang = "default";
00042
00043 switch($childtree["tag"])
00044 {
00045 case "screenname":
00046 $this->screennames[$lang] = $childtree["value"];
00047 break;
00048
00049 case "description":
00050 $this->descriptions[$lang] = $childtree["value"];
00051 break;
00052 }
00053 }
00054 }
00055 }
00056
00057 function getName()
00058 {
00059 return $this->name;
00060 }
00061
00062 function getScreenNames()
00063 {
00064 return $this->screennames;
00065 }
00066
00067 function getDescriptions()
00068 {
00069 return $this->descriptions;
00070 }
00071
00072 }
00073 ?>