示例#1
0
 /**
  * {@inheritdoc}
  */
 public function removeAttribute(AttributeInterface $attribute)
 {
     if ($this->hasAttribute($attribute)) {
         $this->attributes->removeElement($attribute);
         $attribute->setPatient(null);
     }
     return $this;
 }
示例#2
0
 /**
  * {@inheritdoc}
  */
 public function hasAttribute(AttributeInterface $attribute)
 {
     return $this->attributes->contains($attribute);
 }