public function dump($all = false)
    {
        if ($all) {
            return $this->data;
        }

        $data = [];

        foreach (array_keys($this->getFields()) as $field) {
            $data[$field] = $this->data[$field];
        }

        return $data;
    }
public function dump($all = false)
    {
        if ($all) {
            return $this->data;
        }

        $data = [];

        foreach (array_keys($this->getFields()) as $field) {
            $data[$field] = $this->data[$field];
        }

        return $data;
    }
public function dump ( $ all = false ) { if ( $ all ) { return $ this -> data ; } $ data = [ ] ; foreach ( array_keys ( $ this -> getFields ( ) ) as $ field ) { $ data [ $ field ] = $ this -> data [ $ field ] ; } return $ data ; }
Dump all data as array

@param bool $all

@return array
Dump all data as array