params = $params; } /** * @return mixed * @throws Exception */ public function toArray() { if (!is_array($this->params)) { return ArrayAccess::toArray($this->params); } return $this->params; } /** * @param $name * @return mixed|null * @throws Exception */ public function get($name) { $array = $this->toArray(); if (!isset($array[$name])) { return null; } return $array[$name]; } }