public function getAttributes() { if ($attributes = $this->getViewState('Attributes', null)) { return $attributes; } else { $attributes = new TAttributeCollection(); $this->setViewState('Attributes', $attributes, null); return $attributes; } }