Lines Matching refs:key

37 	function getCurrent($key){  argument
41 if (($v = $this->getProtected($key)) !== null) {return $v;}
42 return $this->getCurrentNoProt($key);
45 private function getCurrentNoProt($key){ argument
50 if (($v = @$this->_values[$key]['value']) !== null){ return $v; }
51 if ($this->_parent) { return $this->_parent->getCurrent($key); }
58 if (($v = $this->_hierarchy->getLocal($key)) !== null) {return $v;}
59 return $this->_hierarchy->getDefault($key);
62 function getDefault($key){ argument
65 if (($v = $this->getProtected($key)) !== null) {return $v;}
66 if ($this->_parent){ return $this->_parent->getCurrent($key); }
71 if (($v = $this->_hierarchy->getLocal($key)) !== null) {return $v;}
72 return $this->_hierarchy->getDefault($key);
76 function getLocal($key){ argument
80 if (($v = $this->getProtected($key)) !== null) {return null;}
81 if (($v = @$this->_values[$key]['value']) !== null){ return $v; }
85 function getProtected($key){ argument
89 if (($v = $this->getParentProtected($key)) !== null) {return $v;}
90 if (@$this->_values[$key]['protect']){ return $this->getCurrentNoProt($key); }
93 function getParentProtected($key){ argument
95 return $this->_parent->getProtected($key);
97 return $this->_hierarchy->getProtected($key);
101 function isLevelValue($key){ argument
102 return isset($this->_values[$key]['value']);
104 function getLevelValue($key){ argument
105 return @$this->_values[$key]['value'];
107 function isLevelValueIgnored($key){ argument
108 return (isset($this->_values[$key]['value']) && ($this->getParentProtected($key) !== null));
110 function isLevelProtected($key){ argument
111 return isset($this->_values[$key]['protect']);
135 foreach ($this->_hierarchy->getFieldConfig() as $key=>$meta){
136 $ret[$key] = $this->getCurrent($key);
148 foreach ($this->_hierarchy->getFieldConfig() as $key=>$meta){
149 $this->_settings[$key] = new settingswrapper($key,$this,$meta,$this->_values[$key]);
157 foreach ($data as $key=>$new){
159 if (!$set[$key]->tryUpdate($new['config'])){ // returns false on error
162 $par_val = $this->getDefault($key);
163 if ($set[$key]->_value !== null && $par_val !== $set[$key]->_value){
164 …$this->_values[$key]['value'] = $set[$key]->_value; // we do need to save value, as it's not defau…
166 unset($this->_values[$key]['value']); // we do need to delete the value, as it's default.
173 $par_val = $this->getParentProtected($key);
175 $set[$key]->setProtect($toset);
176 if ($toset) $this->_values[$key]['protect'] = true; // we only save if a level is protected.
177 else unset($this->_values[$key]['protect']);
179 if (empty($this->_values[$key]))
180 unset($this->_values[$key]);
189 foreach ($keys as $key){
190 $set[$key]->markChanged($key);
210 foreach ($this->_getSettings() as $key => $setting){
288 foreach ($this->_hierarchy->getFieldConfig() as $key=>$meta){
290 $ret[$key] = $this->getCurrent($key);
298 foreach ($this->_hierarchy->getFieldConfig() as $key=>$meta){
300 $this->_settings[$key] = new settingswrapper_export($key,$this,$meta,$this->_values[$key]);