public function __construct($attr = []) { foreach ($attr as $key => $value) { $this->{$key} = $value; } }