public function getAttribute($key, $default = null)
{
$this->_fetchAttributes();
$getter = 'get' . $key;
if (method_exists($this, $getter)) {
return $this->{$getter}();
} else {
return isset($this->attributes[$key]) ? $this->attributes[$key] : $default;
}
}