public function toArray($simplify = false): array
    {
        $r = [];
        foreach ($this as $key => $val) {
            $r[$key] = $val;
        }
        if ($simplify) {
            $r = array_filter($r);
        }

        return $r;
    }