Class fs3LocalBucket

Description

Implements interfaces:

This class implements the fs3Bucket interface using a local directory structure. As a compromise for not using a database to track the contents, file name conventions should be applied to object paths.

Located in /classes/fs3LocalBucket.php (line 24)


	
			
Method Summary
fs3LocalBucket fs3LocalBucket (string $bucketDirectory)
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)
Methods
Constructor fs3LocalBucket (line 32)

Constructor

  • exception: fs3Exception on error.
  • access: public
fs3LocalBucket fs3LocalBucket (string $bucketDirectory)
  • string $bucketDirectory: the directory containing the bucket objects.
createBucket (line 168)

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 178)

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 154)

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 78)

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 54)

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 108)

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 192)

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

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