Property | Type | Description | |
---|---|---|---|
$api_version | string | Uploadcare rest API version | |
$cdn_host | string | Uploadcare CDN host | |
$cdn_protocol | string | Uploadcare CDN protocol | |
$uploader | Uploader instance | ||
$version | string | Uploadcare library version | |
$widget | Widget instance. |
Method | Description | |
---|---|---|
__construct ( string $public_key, string $secret_key, string $userAgentName = null, string $cdn_host = null, string $cdn_protocol = null, integer $retry_throttled = null ) | Constructor | |
__preparedRequest ( string $type, string $request_type = 'GET', array $params = [], array $data = [], null $retry_throttled = null ) : object | Make request to API. | |
booleanString ( $bool ) : string | Convert boolean to string | |
copyFile ( string $source, string $target = null ) : |
Copy file | |
dateTimeString ( string | DateTime $datetime ) : null | string | Convert datetime from string or \DateTime object to ATOM string | |
getCdnUri ( ) : string | Return CDN URI | |
getFile ( string $uuid_or_url ) : |
Get object of File class by id | |
getFileList ( array $options = [] ) : |
Return an iterator of File objects to work with. | |
getFilesChunk ( array $options = [], $reverse = false ) : array | Get portion of files from server respecting filters | |
getFilesCount ( array $options = [] ) : mixed | Return count of files respecting filters | |
getGroup ( string $uuid_or_url ) : uploadcare\Group | Get group. | |
getGroupList ( $from = null ) : array | Return an array of groups | |
getPublicKey ( ) : string | Return public key | |
getUserAgent ( ) : string | Returns full user agent string | |
request ( string $method, string $path, array $data = [], array $headers = [] ) : object | Run raw request to REST. |
Method | Description | |
---|---|---|
__getPath ( string $type, array $params = [] ) : string | Return path to send request to. | |
__getQueryString ( array $queryAr = [], string $prefixIfNotEmpty = '' ) : string | Convert query array to encoded query string. | |
__setHeaders ( $ch, array $add_headers = [], array $data = [] ) : void | Set all the headers for request and set returntrasfer. | |
__setRequestType ( $ch, string $type = 'GET' ) : void | Set request type. |
public __construct ( string $public_key, string $secret_key, string $userAgentName = null, string $cdn_host = null, string $cdn_protocol = null, integer $retry_throttled = null ) | ||
$public_key | string | A public key given by Uploadcare.com |
$secret_key | string | A private (secret) key given by Uploadcare.com |
$userAgentName | string | Custom User agent name to report |
$cdn_host | string | CDN Host |
$cdn_protocol | string | CDN Protocol |
$retry_throttled | integer | Retry throttled requests this number of times |
public __preparedRequest ( string $type, string $request_type = 'GET', array $params = [], array $data = [], null $retry_throttled = null ) : object | ||
$type | string | Construct type. Url will be generated using this params. Options: store |
$request_type | string | Request type. Options: get, post, put, delete. |
$params | array | Additional parameters for requests as array. |
$data | array | Data will be posted like json. |
$retry_throttled | null | |
return | object |
public static booleanString ( $bool ) : string | ||
$bool | ||
return | string |
public getFileList ( array $options = [] ) : |
||
$options | array | |
return |
public getFilesChunk ( array $options = [], $reverse = false ) : array | ||
$options | array | |
return | array |
public getFilesCount ( array $options = [] ) : mixed | ||
$options | array | |
return | mixed |
public getGroupList ( $from = null ) : array | ||
$from | string | |
return | array |
public getUserAgent ( ) : string | ||
return | string |
public string $api_version | ||
return | string |