src/PropertySet.php
public function setProperty($key, $value = null){
		if($key instanceof Property){
			$value	= $key;
			$key	= $key->getName();
		}elseif(!$value instanceof Property){
			$value	= new Property($key, $value);
		}
		
		foreach($this->properties as $index=>$property){
			if($property->getName() == $key){
				unset($this->properties[$index]);
			}
		}
		
		$this->properties[] = $value;
		return $this;
	}
public function setProperty($key, $value = null){
		if($key instanceof Property){
			$value	= $key;
			$key	= $key->getName();
		}elseif(!$value instanceof Property){
			$value	= new Property($key, $value);
		}
		
		foreach($this->properties as $index=>$property){
			if($property->getName() == $key){
				unset($this->properties[$index]);
			}
		}
		
		$this->properties[] = $value;
		return $this;
	}
public function setProperty ( $ key , $ value = null ) { if ( $ key instanceof Property ) { $ value = $ key ; $ key = $ key -> getName ( ) ; } elseif ( ! $ value instanceof Property ) { $ value = new Property ( $ key , $ value ) ; } foreach ( $ this -> properties as $ index => $ property ) { if ( $ property -> getName ( ) == $ key ) { unset ( $ this -> properties [ $ index ] ) ; } } $ this -> properties [ ] = $ value ; return $ this ; }
Appending a property at the end and cleaning up any property with the same name
@param string $key Name of the property
@param string $value String representation of the values
Appending a property at the end and cleaning up any property with the same name