public function fill(?array
$data = null
) { if (!
is_array($data)) { return $this;
} foreach ($data as $key =>
$value) { $this->
__set($key,
$value);
} return $this;
} /**
* General method that will return all public and protected values
* of this entity as an array. All values are accessed through the
* __get() magic method so will have any casts, etc applied to them.
*
* @param bool $onlyChanged If true, only return values that have changed since object creation
* @param bool $cast If true, properties will be cast.
* @param bool $recursive If true, inner entities will be cast as array as well.
*/