Cloud_Handler_Yandex_Controller
extends Cloud_Controller
in package
Yandex REST API https://tech.yandex.ru/disk/rest/
Tags
Table of Contents
Properties
- $_allowedProperties : array<string|int, mixed>
- Allowed object properties
- $_cache : array<string|int, mixed>
- listDir Cache
- $_config : array<string|int, mixed>
- Config
- $_instance : array<string|int, mixed>
- Instance
- $_oCloud : object|null
- Cloud_Model object
- $_propertiesValues : array<string|int, mixed>
- Properties values
- $_timeout : array<string|int, mixed>
- Timeout
- $_token : mixed
- Token
- $_unlimitedProperties : bool
- Object has unlimited number of properties
Methods
- __construct() : mixed
- Constructor
- addAllowedProperties() : self
- Add additional allowed properties
- addAllowedProperty() : self
- Add additional allowed property
- delete() : bool
- Delete file from cloud
- download() : bool
- Download file from cloud
- factory() : object
- Create and return an object
- getAccessToken() : string
- Get access token
- getBreadCrumbs() : array<string|int, mixed>
- Ger breadcrumbs
- getClouds() : array<string|int, mixed>
- Get clouds
- getOauthCodeUrl() : string
- Get OAuth url
- listDir() : array<string|int, mixed>
- Get directory list
- set() : self
- Run when writing data to inaccessible properties
- setUnlimitedProperties() : self
- Set unlimitedProperties
- upload() : bool
- Upload file into cloud
Properties
$_allowedProperties
Allowed object properties
protected
array<string|int, mixed>
$_allowedProperties
= array()
$_cache
listDir Cache
protected
static array<string|int, mixed>
$_cache
= array()
$_config
Config
protected
array<string|int, mixed>
$_config
= array()
$_instance
Instance
protected
static array<string|int, mixed>
$_instance
= array()
$_oCloud
Cloud_Model object
protected
object|null
$_oCloud
= \NULL
$_propertiesValues
Properties values
protected
array<string|int, mixed>
$_propertiesValues
= array()
$_timeout
Timeout
protected
array<string|int, mixed>
$_timeout
= array()
$_token
Token
protected
mixed
$_token
= \NULL
$_unlimitedProperties
Object has unlimited number of properties
protected
bool
$_unlimitedProperties
= \FALSE
Methods
__construct()
Constructor
public
__construct(Cloud_Model $oCloud) : mixed
Parameters
- $oCloud : Cloud_Model
addAllowedProperties()
Add additional allowed properties
public
addAllowedProperties(array<string|int, mixed> $array) : self
Parameters
- $array : array<string|int, mixed>
-
array of properties' names
Return values
selfaddAllowedProperty()
Add additional allowed property
public
addAllowedProperty(string $property) : self
Parameters
- $property : string
-
property name
Return values
selfdelete()
Delete file from cloud
public
delete(object $oObjectData) : bool
Parameters
- $oObjectData : object
-
file object
Return values
booldownload()
Download file from cloud
public
download(string $sFileName, string $sTargetDir[, mixed $aParams = array() ]) : bool
Parameters
- $sFileName : string
-
file name
- $sTargetDir : string
-
target file dir
- $aParams : mixed = array()
-
options, e.g. for export add 'mimeType' => 'application/pdf'
Return values
boolfactory()
Create and return an object
public
static factory([int $iCloudId = 0 ]) : object
Parameters
- $iCloudId : int = 0
-
cloud id
Return values
objectgetAccessToken()
Get access token
public
getAccessToken() : string
Return values
stringgetBreadCrumbs()
Ger breadcrumbs
public
getBreadCrumbs() : array<string|int, mixed>
Return values
array<string|int, mixed>getClouds()
Get clouds
public
static getClouds() : array<string|int, mixed>
Return values
array<string|int, mixed>getOauthCodeUrl()
Get OAuth url
public
getOauthCodeUrl() : string
Return values
stringlistDir()
Get directory list
public
listDir() : array<string|int, mixed>
Return values
array<string|int, mixed>set()
Run when writing data to inaccessible properties
public
set(string $property, string $value) : self
Parameters
- $property : string
-
property name
- $value : string
-
property value
Return values
selfsetUnlimitedProperties()
Set unlimitedProperties
public
setUnlimitedProperties([bool $value = TRUE ]) : self
Parameters
- $value : bool = TRUE
-
default TRUR
Return values
selfupload()
Upload file into cloud
public
upload(string $sSourcePath[, string $sDestinationFileName = NULL ][, array<string|int, mixed> $aParams = array() ]) : bool
Parameters
- $sSourcePath : string
-
file name
- $sDestinationFileName : string = NULL
- $aParams : array<string|int, mixed> = array()
-
options, e.g. 'mimeType' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'