\QGoogleUploadFile

This class upload a file to Google Drive

Summary

Methods
Properties
Constants
__construct()
__get()
uploadFile()
$file
$mimeType
$client
$service
$error
$errorGoogle
No constants found
No protected methods found
$client
$service
$error
$errorGoogle
$file
$mimeType
N/A
No private methods found
No private properties found
N/A

Properties

$file

$file : \Google_DriveFile

contains Google file

Type

\Google_DriveFile

$mimeType

$mimeType : string

contains mime type of the file

Type

string

$client

$client : \Google_Client

contains Google Client

Type

\Google_Client

$service

$service : \Google_DriveService

contains Google Drive Service API to interact with Drive

Type

\Google_DriveService

$error

$error : string

contains error message

Type

string

$errorGoogle

$errorGoogle : string

contains error message from Google_Exception

Type

string

$client

$client : \Google_Client

Type

\Google_Client — Google Client API

$service

$service : \Google_DriveService

Type

\Google_DriveService — Google Drive Service API to interact with Drive

$error

$error : string

Type

string — Error message

$errorGoogle

$errorGoogle : string

Type

string — Google error message

$file

$file : \Google_DriveFile

Type

\Google_DriveFile — Google Drive file

$mimeType

$mimeType : string

Type

string — mime type of the file

Methods

__construct()

__construct() : void

Create the QGoogleUploadFile object.

__get()

__get(string $strName) : \Google_DriveFile|\Google_Client|\Google_DriveService|string|null

PHP Magic __get method implementation.

Parameters

string $strName

Name of the property to be fetched.

Throws

\Exception|\QCallerException

Returns

\Google_DriveFile|\Google_Client|\Google_DriveService|string|null

uploadFile()

uploadFile(string $path, string $file, string $description) : void

Upload the file on the Google Drive.

Parameters

string $path

The path of the file to upload on the Google Drive.

string $file

The name of the file to to upload on the Google Drive (if is null, the whole folder is upload).

string $description

The description of the upload file.