public function getParam($key, $default = null) { // If the key has been set then return its value. if ($this->hasParam($key)) { return $this->getParams()[$key]; } else { return $default; } }