public function smart(AbstractAttribute $attribute) { $attribute->setName($this->attribute)->setParent($this->entity); return $this->attributes[$this->attribute] = $attribute; }