private function getProperty($data, $key, $default = null) { if (array_key_exists($key, $data)) { return $data[$key]; } return $default; }