Lines Matching refs:value
42 * Apply the set filter to the given value
118 $value = $this->applyfilter($this->access[$name]);
119 if ($nonempty && empty($value)) return $default;
120 return $value;
127 * @param mixed $value Value to set
129 public function set($name, $value)
131 $this->access[$name] = $value;
138 * and intialized with the given $default value before a reference is returned
141 * @param mixed $default If parameter is not set, initialize with this value
166 $value = $this->applyfilter($this->access[$name]);
167 if ($value === '') return $default;
168 if ($nonempty && empty($value)) return $default;
170 return (int)$value;
185 $value = $this->applyfilter($this->access[$name]);
186 if ($nonempty && empty($value)) return $default;
188 return (string)$value;
192 * Access a request parameter and make sure it is has a valid value
207 $value = $this->applyfilter($this->access[$name]);
208 $found = array_search($value, $valids);
209 if ($found !== false) return $valids[$found]; // return the valid value for type safety
227 $value = $this->applyfilter($this->access[$name]);
228 if ($value === '') return $default;
229 if ($nonempty && empty($value)) return $default;
231 return (bool)$value;
254 * This is useful to access keys where the information is given as an array key or as a single array value.
277 $value = array_shift($keys);
278 if ($value === 0) {
279 // we had a numeric array, assume the value is not in the key
280 $value = array_shift($this->access[$name]);
283 $this->set($name, $value);