Constructor
fs3RemoteBucket
fs3RemoteBucket
(string $bucket, string $host, string $key, string $secret)
-
string
$bucket: the bucket to be accessed. Will be lowercased since bucket names are also hostnames in S3.
-
string
$host: to be connected. This should not include the bucket name.
-
string
$key: user key to use for authentication
-
string
$secret: user secret to use for authentication
This method creates a new bucket. The bucket name is the one assigned to the instance.
void
createBucket
()
Implementation of:
- fs3Bucket::createBucket()
- This method creates a new bucket. The bucket name is the one assigned to the instance.
This method delete a bucket. The bucket name is the one assigned to the instance.
void
deleteBucket
()
Implementation of:
- fs3Bucket::deleteBucket()
- This method delete a bucket. The bucket name is the one assigned to the instance.
This method removes a object from the bucket.
This operation does not affect the master repsoitory if set.
void
deleteObject
(string $objectPath)
-
string
$objectPath: the path to the object in the bucket.
Implementation of:
- fs3Bucket::deleteObject()
- This method removes a object from the bucket.
This method creats a list of objects from the bucket.
array
getBucket
(string $prefix)
-
string
$prefix: the path prefix
Implementation of:
- fs3Bucket::getBucket()
- This method creats a list of objects from the bucket.
This method loads an object from the bucket.
If there is a master set, it will first check its own bucket before requesting it from the master.
object data
getObject
(string $objectPath)
-
string
$objectPath: the path to the object in the bucket.
Implementation of:
- fs3Bucket::getObject()
- This method gets an object from the bucket.
This method saves an object to the bucket.
This operation does not affect the master repsoitory if set.
void
putObject
(string $objectPath, string $objectData, [string $acl = 'public-read'])
-
string
$objectPath: the path to the object in the bucket.
-
string
$objectData: the contents of the object.
-
string
$acl: the access control level for the object. Options are private, public-read, public-read-write, and authenticated-read.
Implementation of:
- fs3Bucket::putObject()
- This method saves an object in the bucket.
This method assigns a read-only master bucket. It is just another
implementation of the fs3Bucket. This is used to create union buckets for example. Also, useful when developing against huge existing object stores and ensuring that the master one does not get corrupted.
Implementation of:
- fs3Bucket::setReadOnlyMaster()
- This method assigns a read-only master bucket. It is just another
Flags use of SSL connection (https)
void
useSSL
([boolean $flag = true])
-
boolean
$flag: true/false for using ssl (https)
Flags use of virtual host method for bucket identifciation. Amazon
used to put the bucket names in the URI, but now recomends puting the bucket name prepended to the host name. This is fine for them, but it can be pain for most to configure the web server to support this, so for fs3 it will not be default; however, it is supported.
void
useVirtualHosts
([boolean $flag = true])
-
boolean
$flag: true for using the virtual host method.