function __construct($settings) { if (is_array($settings)) { foreach ($settings as $k => $v) { $this->{$k} = $v; } } }