public function addAttribute(AttributeMetadata $attribute) { $attribute->setOwner($this); $this->attributes[] = $attribute; }