GSDownloadFiles
in package
CloudFramework Download GS Files v74.0014 stored in Datastore tokens author: hl@cloudframework.io Based in "cloudframework-io/appengine-php-core-7.4": "^v74.00143"
Table of Contents
Properties
- $cache : mixed
- $core : mixed
- $debug : mixed
- $error : mixed
- $errorMsg : mixed
- $namespace : mixed
- $test : mixed
Methods
- __construct() : mixed
- addError() : mixed
- To handle errors
- createSecuredToken() : string|void
- Prepare a token to be used in htmlDownloadFromSecuredToken
- downloadBigFileForWeb() : mixed
- Execute a download file taking an array previously created with $this->createSecuredToken($gsfile)
- htmlDownloadFromSecuredToken() : void
- Allow to download the file in a HTML page taking a token created with $this->createSecuredToken() It print-out a HTML output of the document to be downloaded.
Properties
$cache
public
mixed
$cache
$core
public
mixed
$core
$debug
public
mixed
$debug
= \false
$error
public
mixed
$error
= \false
$errorMsg
public
mixed
$errorMsg
= []
$namespace
public
mixed
$namespace
$test
public
mixed
$test
= \false
Methods
__construct()
public
__construct(Core7 &$core, mixed $namespace) : mixed
Parameters
- $core : Core7
- $namespace : mixed
addError()
To handle errors
public
addError( $value) : mixed
Parameters
createSecuredToken()
Prepare a token to be used in htmlDownloadFromSecuredToken
public
createSecuredToken(string $gs_url[, int $max_dowloads = 1 ][, int $max_seconds = 90 ][, string $file_name = '' ][, string $file_type = '' ]) : string|void
Parameters
- $gs_url : string
- $max_dowloads : int = 1
-
default 1
- $max_seconds : int = 90
-
default 90
- $file_name : string = ''
- $file_type : string = ''
Return values
string|voiddownloadBigFileForWeb()
Execute a download file taking an array previously created with $this->createSecuredToken($gsfile)
public
downloadBigFileForWeb(array<string|int, mixed> $data) : mixed
Parameters
- $data : array<string|int, mixed>
-
'url'=>'gs://xxxx'
htmlDownloadFromSecuredToken()
Allow to download the file in a HTML page taking a token created with $this->createSecuredToken() It print-out a HTML output of the document to be downloaded.
public
htmlDownloadFromSecuredToken(string $token) : void
Parameters
- $token : string