Class fs3RemoteBucket

Description

Implements interfaces:

This class implements the fs3Bucket interface using a remote connection compilent with the Amazon S3 API.

Located in /classes/fs3RemoteBucket.php (line 23)


	
			
Method Summary
fs3RemoteBucket fs3RemoteBucket (string $bucket, string $host, string $key, string $secret)
void createBucket ()
void deleteBucket ()
void deleteObject (string $objectPath)
array getBucket (string $prefix)
object data getObject (string $objectPath)
void putObject (string $objectPath, string $objectData, [string $acl = 'public-read'])
void setReadOnlyMaster (fs3Bucket $master)
void useSSL ([boolean $flag = true])
void useVirtualHosts ([boolean $flag = true])
Methods
Constructor fs3RemoteBucket (line 36)

Constructor

  • access: public
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
createBucket (line 103)

This method creates a new bucket. The bucket name is the one assigned to the instance.

  • exception: fs3Exception on error.
  • access: public
void createBucket ()

Implementation of:
fs3Bucket::createBucket()
This method creates a new bucket. The bucket name is the one assigned to the instance.
deleteBucket (line 114)

This method delete a bucket. The bucket name is the one assigned to the instance.

  • exception: fs3Exception on error.
  • access: public
void deleteBucket ()

Implementation of:
fs3Bucket::deleteBucket()
This method delete a bucket. The bucket name is the one assigned to the instance.
deleteObject (line 92)

This method removes a object from the bucket.

This operation does not affect the master repsoitory if set.

  • exception: fs3Exception on error.
  • access: public
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.
getBucket (line 166)

This method creats a list of objects from the bucket.

  • return: of fs3ObjectInfo instances
  • exception: fs3Exception on error.
  • access: public
array getBucket (string $prefix)
  • string $prefix: the path prefix

Implementation of:
fs3Bucket::getBucket()
This method creats a list of objects from the bucket.
getObject (line 56)

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.

  • return: as a string
  • exception: fs3Exception on error.
  • access: public
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.
putObject (line 79)

This method saves an object to the bucket.

This operation does not affect the master repsoitory if set.

  • exception: fs3Exception on error.
  • access: public
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.
setReadOnlyMaster (line 128)

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.

  • access: public
void setReadOnlyMaster (fs3Bucket $master)

Implementation of:
fs3Bucket::setReadOnlyMaster()
This method assigns a read-only master bucket. It is just another
useSSL (line 153)

Flags use of SSL connection (https)

  • access: public
void useSSL ([boolean $flag = true])
  • boolean $flag: true/false for using ssl (https)
useVirtualHosts (line 143)

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.

  • access: public
void useVirtualHosts ([boolean $flag = true])
  • boolean $flag: true for using the virtual host method.

Documentation generated on Thu, 04 Feb 2010 04:14:25 +0000 by phpDocumentor 1.4.3