public function getAttribute($name) { if ($attributes = $this->getViewState('Attributes', null)) { return $attributes->itemAt($name); } else { return null; } }