public function __construct(array $values = null) { foreach ((array) $values as $key => $value) { $this->{$key} = $value; } }