GoogleStorageProvider
class GoogleStorageProvider extends StorageProvider
Class GoogleStorageProvider
This class represents the cloud storage implementation of Google. The SDK is placed in the lib/google folder and uses an autoload to load all needed classes. The authorization is provided by the client class Google_Client. The main file operations are processed by the Google_service_Drive class. The account information is provided by the Google_Service_Oauth2 class. All service classes need the client class to instantiate.
The token is given after a successful authorization is a json object. This full json object is needed to restore the client fromt database. Because the access token is expired after 3600, the json object contains the refresh token that is important to get a new access token after the current expires. The refresh token can be only received, if the access type is set to 'offline'.
Properties
Controller | $mod | from StorageProvider | |
array | $_hook_info | Hook Information "id" => "4914" "instance_id" => "api_microsoft" "name" => "oauth_client" "hook" => "webservice.oauth_client" "type" => "object" "registry_name" => "oauth_client" "function_name" => "" "internal" => "no" "dep_mode" => "local" "active" => "yes" "title" => "Basic functions" "description" => "" "options" => "" |
from BaseHook |
Methods
Initialize and executes the download of a selected remote file.
Get Hook identifier consists of instance_id puncto separator and hook name Ex. instance_id.name
Return Hook information (ID, InstanceID, Name, Hook Type, Object Type, ...)
No description
No description
Returns the account used storage quota in percent.
No description
No description
No description
No description
No description
Returns true if this hook is available otherwise false.
Returns true if the provider is connected.
No description
No description
No description
Details
in
StorageProvider at line 146
bool
do_download(string $cloud_source_path, string $destination_dir_path)
Initialize and executes the download of a selected remote file.
in
BaseHook at line 76
string
getHookDescription()
No description
in
BaseHook at line 55
string
getHookIdentifier()
Get Hook identifier consists of instance_id puncto separator and hook name Ex. instance_id.name
in
BaseHook at line 45
array
getHookInfoValue(bool $key = false)
Return Hook information (ID, InstanceID, Name, Hook Type, Object Type, ...)
in
BaseHook at line 69
string
getHookInstance()
No description
in
BaseHook at line 62
string
getHookName()
No description
in
BaseHook at line 83
string
getHookTitle()
No description
in
BaseHook at line 88
getObject()
No description
in
StorageProvider at line 122
int
get_account_quota_free()
Returns the account free storage quota in bytes.
at line 103
int
get_account_quota_total()
No description
at line 110
int
get_account_quota_used()
No description
in
StorageProvider at line 131
int
get_account_quota_used_percent()
Returns the account used storage quota in percent.
at line 126
StorageContent
get_content(string $path)
No description
at line 96
string
get_icon_class_name()
No description
at line 89
string
get_provider_name()
No description
at line 82
string
get_provider_title()
No description
in
StorageProvider at line 113
bool
hideWhenDisconnected()
No description
at line 46
init_provider()
No description
at line 119
bool
isAvailable()
Returns true if this hook is available otherwise false.
at line 75
bool
is_connected()
Returns true if the provider is connected.
at line 180
array
on_browse_tree(string $path = null)
No description
at line 288
protected
on_download(string $cloud_source_path, string $destination_dir_path)
No description
at line 258
on_upload(string $cloud_path, string $fileName, resource $fileStream)
No description