public function __toString()
{
if (isset($this->attributes[$this->attribute])) {
if (is_string($this->attributes[$this->attribute])) {
return (string) $this->attributes[$this->attribute];
} else {
return (string) json_encode($this->attributes[$this->attribute]);
}
} else {
return '';
}
}