Phpfox_Cdn_Module_S3

Description

Class to work with Amazons S3 CDN

  • author: Raymond Benc
  • version: $Id: s3.class.php 1687 2010-07-22 03:13:27Z Raymond_Benc $
  • copyright: [PHPFOX_COPYRIGHT]
  • link: http://aws.amazon.com/s3/

Located in /include/library/phpfox/cdn/module/s3.class.php (line 17)

Phpfox_Cdn_Abstract
   |
   --Phpfox_Cdn_Module_S3
Variable Summary
 object $_oObject
 string $_sBucket
Method Summary
 Phpfox_Cdn_Module_S3 __construct ()
 string getServerId ()
 string getUrl (string $sPath)
 bool put (string $sFile, [string $sName = null])
Variables
bool $_bHasBucket = false (line 38)

Bool value if the bucket has already been created or not.

  • access: private
false $_bIsUploaded = false (line 45)

Bool value if we were able to upload the file or not.

  • access: private
object $_oObject = null (line 24)

Object for the amazon s3 class

  • access: private
string $_sBucket = null (line 31)

Name of the bucket we plan to store all the uploaded data

  • access: private
Methods
Constructor __construct (line 51)

Loads the amazons3 library developed by another group.

  • access: public
Phpfox_Cdn_Module_S3 __construct ()
getServerId (line 114)

Returns a server ID. We always run "1" (int) if the file was uploaded to the amazon server, if not return "0" (int) so we display the local file instead.

  • access: public
string getServerId ()
getUrl (line 125)

Get the full URL to the amazon bucket with support to load a CDN CNAME URL.

  • return: Full path to the file on amazons server.
  • access: public
string getUrl (string $sPath)
  • string $sPath: Path to the fule we are going to display.
put (line 66)

Uploads the file to amazons server.

  • return: We only return a bool false if we were not able to upload the item.
  • access: public
bool put (string $sFile, [string $sName = null])
  • string $sFile: Full path to where the file is located.
  • string $sName: Optional name of the file once it is uploaded. By default we just use the original file name.

Documentation generated on Tue, 28 Sep 2010 10:36:43 +0200 by phpDocumentor 1.4.0a2