public function getData($key = null, $default = null) {
        if ($this->hasInput()) {
            return $this->getInput($key, $default);
        } else {
            return $this->getQuery($key, $default);
        }
    }