\CloudBucket
Base class for all bucket drivers
- Author: Mark Guinn <mark@adaircreative.com>
Synopsis
class CloudBucket
extends SS_Object
{
- // constants
- const BASE_URL = 'BaseURL';
- const SECURE_URL = 'SecureURL';
- const LOCAL_COPY = 'LocalCopy';
- const TYPE = 'Type';
- const LINK_SMART = 0;
- const LINK_HTTP = 1;
- const LINK_HTTPS = 2;
- const LINK_BASE = 1;
- const LINK_SECURE = 2;
- // members
- protected $localPath;
- protected $baseURL;
- protected integer $baseUrlIndex = 0;
- protected $secureURL;
- protected integer $secureUrlIndex = 0;
- protected $config;
- // methods
- public abstract void put()
- public abstract void delete()
- public abstract void rename()
- public abstract string getContents()
- public void __construct()
- protected array scrubBasePath()
- public string getBaseURL()
- public string getSecureURL()
- protected string roundRobinGet()
- public string getLinkFor()
- public string getTemporaryLinkFor()
- public string getRelativeLinkFor()
- public bool isLocalCopyEnabled()
Hierarchy
Extends
- SS_Object
Constants
Name | Value |
---|---|
BASE_URL | 'BaseURL' |
SECURE_URL | 'SecureURL' |
LOCAL_COPY | 'LocalCopy' |
TYPE | 'Type' |
LINK_SMART | 0 |
LINK_HTTP | 1 |
LINK_HTTPS | 2 |
LINK_BASE | 1 |
LINK_SECURE | 2 |
Members
protected
- $baseURL — array
- $baseUrlIndex — int
- $config — array
- $localPath — string
- $secureURL — array
- $secureUrlIndex — int
Methods
protected
- roundRobinGet() — Given an array property, returns the next element from it and increments an index field
- scrubBasePath()
public
- __construct()
- delete() — NOTE: This method must handle string filenames as well for the purpose of deleting cached resampled images.
- getBaseURL()
- getContents()
- getLinkFor()
- getRelativeLinkFor() — Returns the full path and filename, relative to the BaseURL
- getSecureURL()
- getTemporaryLinkFor() — This version just returns a normal link. I'm assuming most buckets will implement this but I want it to be optional.
- isLocalCopyEnabled()
- put()
- rename()