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

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

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

@param bool $simplify

@return array
Convert this object to an array minimized