public function __construct(array $points) { foreach ($points as $key => $val) { $this->{$key} = $val; } }