Stable\Cdn\Client

Stable.cz CDN client

Basic usage examples:

// construct
$client = new \Stable\Cdn\Client(YOUR_API_KEY);

// create some local file
file_put_contents('localfile', date('Y-m-d'));

// upload file
$client->upload('localfile', 'path/to/remotefile');

// verify file exists
$client->ls('path/to/remotefile');

// list files in directory
$client->ls('path/to');

// delete remote file
$client->delete('path/to/remotefile');

Synopsis

class Client {
}

Members

protected

  • $apikey — string
  • $url — string

public

  • $calls — array
  • $chunkFileSize — int
  • $curlLastInfo — string
  • $curlLastResult — string

Methods

protected

  • call() — API request call (via cURL)

public

  • __construct() — Constructor
  • configure() — Configure CDN (currently resizer sizes only)
  • delete() — Delete an existing file
  • ls() — List an existing file or directory - get a file info or a directory and its files
  • upload() — Uploads a file to target