public function toArray($ignoreEmpty = false)
    {
        if (!$ignoreEmpty) {
            return $this->data;
        }

        return array_filter(
            $this->data,
            function ($value) {
                return !empty($value);
            }
        );
    }
public function toArray($ignoreEmpty = false)
    {
        if (!$ignoreEmpty) {
            return $this->data;
        }

        return array_filter(
            $this->data,
            function ($value) {
                return !empty($value);
            }
        );
    }
public function toArray ( $ ignoreEmpty = false ) { if ( ! $ ignoreEmpty ) { return $ this -> data ; } return array_filter ( $ this -> data , function ( $ value ) { return ! empty ( $ value ) ; } ) ; }
Extract data to an array

@param boolean $ignoreEmpty

@return array
Extract data to an array