public function asArray()
    {
        $array = [];
        foreach (get_object_vars($this) as $property => $value) {
            if (empty($value)) {
                continue;
            }
            $array[$property] = $value;
        }

        return $array;
    }
public function asArray()
    {
        $array = [];
        foreach (get_object_vars($this) as $property => $value) {
            if (empty($value)) {
                continue;
            }
            $array[$property] = $value;
        }

        return $array;
    }
public function asArray ( ) { $ array = [ ] ; foreach ( get_object_vars ( $ this ) as $ property => $ value ) { if ( empty ( $ value ) ) { continue ; } $ array [ $ property ] = $ value ; } return $ array ; }
Get an array representation of the object.

@return array
An array of all properties that have values.
Get an array representation of the object .