public function get($field, $default = null) { if (!$this->get->has($field)) { if (!$this->post->has($field)) { if (!$this->cookie->has($field)) { if ($default === null) { throw new RequestParameterNotFoundException(); } return $default; } else { return $this->cookie->get($field); } } else { return $this->post->get($field); } } else { return $this->get->get($field); } }
public function has($path) { $parts = explode('/', $path); if (count($parts) <= 1) { return parent::has($path); } $value = $this; while (null !== ($part = array_shift($parts))) { if (!Utils::isArrayAccessible($value) || !isset($value[$part])) { return false; } $value = $value[$part]; } return true; }