public function &getAttribute($key, $default = null) { if (!array_key_exists($key, $this->attributes)) { return $default; } else { return $this->attributes[$key]; } }