public function setValue($name, $value)
{
$metadata = $this->metadata->getProperty($name);
if ($metadata->isReadonly) {
throw new InvalidArgumentException("Property '{$name}' is read-only.");
}
$this->internalSetValue($metadata, $name, $value);
return $this;
}