public addMetadata ( string $name, mixed $value ) | ||
$name | string | name of the metadata to add. |
$value | mixed | value of the metadata to set. |
public function addMetadata($name, $value)
{
if (isset($this->metadata[$name])) {
throw new Exception("Metadata {$name} already in the array!");
}
$this->setMetadata($name, $value);
}