classes/Response.php
public static function download($data){
        if (is_array($data)) {
            if (isset($data['filename'])) static::$force_dl = $data['filename'];
            if (isset($data['charset'])) static::charset($data['charset']);
            if (isset($data['mime'])) static::type($data['mime']);
            if (isset($data['body'])) static::body($data['body']);
        } else static::$force_dl = $data;
    }
public static function download($data){
        if (is_array($data)) {
            if (isset($data['filename'])) static::$force_dl = $data['filename'];
            if (isset($data['charset'])) static::charset($data['charset']);
            if (isset($data['mime'])) static::type($data['mime']);
            if (isset($data['body'])) static::body($data['body']);
        } else static::$force_dl = $data;
    }
public static function download ( $ data ) { if ( is_array ( $ data ) ) { if ( isset ( $ data [ 'filename' ] ) ) static :: $ force_dl = $ data [ 'filename' ] ; if ( isset ( $ data [ 'charset' ] ) ) static :: charset ( $ data [ 'charset' ] ) ; if ( isset ( $ data [ 'mime' ] ) ) static :: type ( $ data [ 'mime' ] ) ; if ( isset ( $ data [ 'body' ] ) ) static :: body ( $ data [ 'body' ] ) ; } else static :: $ force_dl = $ data ; }
Force download of Response body
@param  mixed $data Pass a falsy value to disable download, pass a filename for exporting content or array with raw string data
@return void
Force download of Response body