GoogleCloudStorageComponent
extends Injectable
Table of Contents
Properties
-
$bucket
: Bucket
-
$storage
: StorageClient
Methods
-
__construct()
: mixed
-
copyFile()
: StorageObject
-
deleteFile()
: bool
-
downloadFileByName()
: bool
-
downloadFileContentByName()
: string|null
-
downloadFilesByName()
: bool
-
getBucket()
: Bucket
-
getFileByGcStoragePath()
: StorageObject|null
-
getFiles()
: array<string|int, mixed>
-
getInfoAfterUpload()
: StorageObject
-
getObjectFiles()
: ObjectIterator
-
getValidFilePath()
: string
-
parsePathAndFile()
: stdClass
-
removeLocalDir()
: void
-
setBucket()
: mixed
-
setFilePublicRead()
: string
-
uploadFile()
: void
-
zipFilesByList()
: bool
$bucket
private
Bucket
$bucket
$storage
private
StorageClient
$storage
__construct()
public
__construct() : mixed
copyFile()
public
copyFile(mixed $source, mixed $destinationBucketName, mixed $destinationPath) : StorageObject
Parameters
-
$source
: mixed
-
-
$destinationBucketName
: mixed
-
-
$destinationPath
: mixed
-
Return values
StorageObject
deleteFile()
public
deleteFile(mixed $file) : bool
Parameters
-
$file
: mixed
-
downloadFileByName()
public
downloadFileByName(string $sourceFile, string $destinationFile) : bool
Parameters
-
$sourceFile
: string
-
-
$destinationFile
: string
-
downloadFileContentByName()
public
downloadFileContentByName(string $fileName) : string|null
Parameters
-
$fileName
: string
-
Return values
string|null
downloadFilesByName()
public
downloadFilesByName(array<string|int, mixed> $fileNames, string $destinationDir) : bool
Parameters
-
$fileNames
: array<string|int, mixed>
-
-
$destinationDir
: string
-
getBucket()
public
getBucket() : Bucket
getFileByGcStoragePath()
public
getFileByGcStoragePath(string $path) : StorageObject|null
Parameters
-
$path
: string
-
Return values
StorageObject|null
getFiles()
public
getFiles([array<string|int, mixed>|null $options = [] ]) : array<string|int, mixed>
Parameters
-
$options
: array<string|int, mixed>|null
= []
-
Return values
array<string|int, mixed>
getInfoAfterUpload()
public
getInfoAfterUpload(string $file, string $destinationFile) : StorageObject
Parameters
-
$file
: string
-
-
$destinationFile
: string
-
Return values
StorageObject
getObjectFiles()
public
getObjectFiles([array<string|int, mixed>|null $options = [] ]) : ObjectIterator
Parameters
-
$options
: array<string|int, mixed>|null
= []
-
Return values
ObjectIterator
getValidFilePath()
public
getValidFilePath(string $file[, bool $addPrefix = true ]) : string
Parameters
-
$file
: string
-
-
$addPrefix
: bool
= true
-
parsePathAndFile()
public
parsePathAndFile(string $file) : stdClass
Parameters
-
$file
: string
-
removeLocalDir()
public
removeLocalDir(mixed $src) : void
Parameters
-
$src
: mixed
-
setBucket()
public
setBucket(string $bucketName) : mixed
Parameters
-
$bucketName
: string
-
setFilePublicRead()
public
setFilePublicRead(string $file) : string
Parameters
-
$file
: string
-
uploadFile()
public
uploadFile(string $file, string $destinationFile) : void
Parameters
-
$file
: string
-
-
$destinationFile
: string
-
zipFilesByList()
public
zipFilesByList(array<string|int, mixed> $files, string $outPutFile, string|null $removeDestinationPath) : bool
Parameters
-
$files
: array<string|int, mixed>
-
-
$outPutFile
: string
-
-
$removeDestinationPath
: string|null
-