public function getData($key, $default = null) { return array_key_exists($key, $this->data) ? $this->data[$key] : $default; }