Class fs3Utils

Description

This class provides the common functionality useful to both client and server implementations of the fs3 API.

Located in /classes/fs3Utils.php (line 20)


	
			
Class Constant Summary
 DEFAULT_CONTENT_TYPE = 'application/octet-stream'
Method Summary
static the getContentType (string $path)
the getAwsSignature (string $str, string $secret)
the safePath (string $path)
Methods
static getContentType (line 59)

This method determines the content/mime type of a file based on its extension. This should be adequate for most files.

Amazon has a better method of storing the user-specified mime type with the object. But this implemetation has no database.

  • return: contnent type, a default will be provided it no match.
  • access: public
static the getContentType (string $path)
  • string $path: the object path.
getAwsSignature (line 138)

Returns the Amazon AWS signature for any string.

  • return: signature
  • access: public
the getAwsSignature (string $str, string $secret)
  • string $str: string to sign
  • string $secret: secret to use for signing
safePath (line 30)

This method cleans up the object path removing relative notations and ensuring it does not escape the current directory.

  • return: new path
  • exception: fs3Exception on error.
the safePath (string $path)
  • string $path: the object path.
Class Constants
DEFAULT_CONTENT_TYPE = 'application/octet-stream' (line 164)

The default content type.

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