public function getAttributeSingle($name) { $out = $this->getAttribute($name, false); return is_array($out) ? reset($out) : $out; }