[ Index ]

PHP Cross Reference of Phabricator

title

Body

[close]

/externals/s3/ -> README.txt (source)

   1  AMAZON S3 PHP CLASS
   2  
   3  
   4  USING THE CLASS
   5  
   6  OO method (e,g; $s3->getObject(...)):
   7  $s3 = new S3(awsAccessKey, awsSecretKey);
   8  
   9  Statically (e,g; S3::getObject(...)):
  10  S3::setAuth(awsAccessKey, awsSecretKey);
  11  
  12  
  13  For class documentation see:
  14  http://undesigned.org.za/files/s3-class-documentation/index.html
  15  
  16  
  17  OBJECTS
  18  
  19  
  20  Put an object from a string:
  21      $s3->putObject($string, $bucketName, $uploadName, S3::ACL_PUBLIC_READ)
  22      Legacy function: $s3->putObjectString($string, $bucketName, $uploadName, S3::ACL_PUBLIC_READ)
  23  
  24  
  25  Put an object from a file:
  26      $s3->putObject($s3->inputFile($file, false), $bucketName, $uploadName, S3::ACL_PUBLIC_READ)
  27      Legacy function: $s3->putObjectFile($uploadFile, $bucketName, $uploadName, S3::ACL_PUBLIC_READ)
  28  
  29  
  30  Put an object from a resource (buffer/file size is required):
  31      Please note: the resource will be fclose()'d automatically
  32      $s3->putObject($s3->inputResource(fopen($file, 'rb'), filesize($file)), $bucketName, $uploadName, S3::ACL_PUBLIC_READ)
  33  
  34  
  35  Get an object:
  36      $s3->getObject($bucketName, $uploadName)
  37  
  38  
  39  Save an object to file:
  40      $s3->getObject($bucketName, $uploadName, $saveName)
  41  
  42  
  43  Save an object to a resource of any type:
  44      $s3->getObject($bucketName, $uploadName, fopen('savefile.txt', 'wb'))
  45  
  46  
  47  Copy an object:
  48      $s3->copyObject($srcBucket, $srcName, $bucketName, $saveName, $metaHeaders = array(), $requestHeaders = array())
  49  
  50  
  51  Delete an object:
  52      $s3->deleteObject($bucketName, $uploadName)
  53  
  54  
  55  
  56  BUCKETS
  57  
  58  
  59  Get a list of buckets:
  60      $s3->listBuckets()  // Simple bucket list
  61      $s3->listBuckets(true)  // Detailed bucket list
  62  
  63  
  64  Create a public-read bucket:
  65      $s3->putBucket($bucketName, S3::ACL_PUBLIC_READ)
  66      $s3->putBucket($bucketName, S3::ACL_PUBLIC_READ, 'EU') // EU-hosted bucket
  67  
  68  
  69  Get the contents of a bucket:
  70      $s3->getBucket($bucketName)
  71  
  72  
  73  Get a bucket's location:
  74      $s3->getBucketLocation($bucketName)
  75  
  76  
  77  Delete a bucket:
  78      $s3->deleteBucket($bucketName)
  79  
  80  
  81  
  82  
  83  KNOWN ISSUES
  84  
  85      Files larger than 2GB are not supported on 32 bit systems due to PHP’s signed integer problem
  86  
  87  
  88  
  89  MORE INFORMATION
  90  
  91  
  92      Project URL:
  93      http://undesigned.org.za/2007/10/22/amazon-s3-php-class
  94  
  95      Class documentation:
  96      http://undesigned.org.za/files/s3-class-documentation/index.html
  97  
  98      Bug reports:
  99      https://github.com/tpyo/amazon-s3-php-class/issues
 100  
 101      Amazon S3 documentation:
 102      http://docs.amazonwebservices.com/AmazonS3/2006-03-01/
 103  
 104  
 105  EOF


Generated: Sun Nov 30 09:20:46 2014 Cross-referenced by PHPXref 0.7.1