public function addMetadata($name, $value)
    {
        if (isset($this->metadata[$name])) {
            throw new Exception("Metadata $name already in the array!");
        }
        $this->setMetadata($name, $value);
    }
public function addMetadata($name, $value)
    {
        if (isset($this->metadata[$name])) {
            throw new Exception("Metadata $name already in the array!");
        }
        $this->setMetadata($name, $value);
    }
public function addMetadata ( $ name , $ value ) { if ( isset ( $ this -> metadata [ $ name ] ) ) { throw new Exception ( "Metadata $name already in the array!" ) ; } $ this -> setMetadata ( $ name , $ value ) ; }
Add a new metadata to the row. If the metadata already exists, throws an exception.

@param string $name name of the metadata to add.
@param mixed $value value of the metadata to set.
@throws Exception if the metadata already exists.
Add a new metadata to the row . If the metadata already exists throws an exception .