src/Project/Attribute/AttributeCollection.php
public function addAttribute(AttributeInterface $attribute) {
        if(isset($this->attributes[$attribute->getName()]))
            trigger_error("Attribute " . $attribute->getName() . " already exists", E_USER_NOTICE);

        $this->attributes[ $attribute->getName() ] = $attribute;
    }
public function addAttribute(AttributeInterface $attribute) {
        if(isset($this->attributes[$attribute->getName()]))
            trigger_error("Attribute " . $attribute->getName() . " already exists", E_USER_NOTICE);

        $this->attributes[ $attribute->getName() ] = $attribute;
    }
public function addAttribute ( AttributeInterface $ attribute ) { if ( isset ( $ this -> attributes [ $ attribute -> getName ( ) ] ) ) trigger_error ( "Attribute " . $ attribute -> getName ( ) . " already exists" , E_USER_NOTICE ) ; $ this -> attributes [ $ attribute -> getName ( ) ] = $ attribute ; }
Adds an attribute to the list
Existing attributes are replaced.

@param AttributeInterface $attribute
Adds an attribute to the list Existing attributes are replaced .