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