public function __construct($properties = [], $parent = null) { foreach ($properties as $property => $value) { $this->{$property} = $value; } $this->_parent = $parent; }