/** * Returns variable provided to the script via URL query ($_GET). * If no key is passed, returns the entire array. * @param string $key * @param mixed $default * @return mixed */ public function getQuery($key = null, $default = null) { if (func_num_args() === 0) { return $this->url->getQueryParameters(); } else { return $this->url->getQueryParameter($key, $default); } }