33 $this->setting_names = $a_setting_names;
34 $this->bitmask = $a_bitmask;
46 public function get($a_setting_name)
49 foreach($this->setting_names as $name)
51 if ($name == $a_setting_name)
53 $retval = (($this->bitmask & $i) > 0);
58 require_once
'./Services/Exceptions/classes/class.ilException.php';
59 throw new ilException (
'No such setting on bitmask.');
71 public function set($a_setting_name, $value)
73 if (!in_array($a_setting_name, $this->setting_names))
75 require_once
'./Services/Exceptions/classes/class.ilException.php';
76 throw new ilException (
'No such setting on bitmask.');
79 $current_value = $this->
get($a_setting_name);
80 if ($current_value == $value)
87 foreach($this->setting_names as $name)
89 if ($name == $a_setting_name)
93 $this->bitmask = $this->bitmask | $i;
97 $this->bitmask = $this->bitmask ^ $i;