public function value($key, $default = null)
{
if (!array_key_exists($key, $this->properties) && 1 === func_num_args()) {
throw new \InvalidArgumentException(sprintf('this object has no property with key %s', $key));
}
return array_key_exists($key, $this->properties) ? $this->properties[$key] : $default;
}