|
Moodle
2.2.1
http://www.collinsharper.com
|
Public Member Functions | |
| __construct ($accessKey=null, $secretKey=null, $useSSL=true) | |
Static Public Member Functions | |
| static | setAuth ($accessKey, $secretKey) |
| static | listBuckets ($detailed=false) |
| static | getBucket ($bucket, $prefix=null, $marker=null, $maxKeys=null, $delimiter=null) |
| static | putBucket ($bucket, $acl=self::ACL_PRIVATE, $location=false) |
| static | deleteBucket ($bucket) |
| static | inputFile ($file, $md5sum=true) |
| static | inputResource (&$resource, $bufferSize, $md5sum= '') |
| static | putObject ($input, $bucket, $uri, $acl=self::ACL_PRIVATE, $metaHeaders=array(), $requestHeaders=array()) |
| static | putObjectFile ($file, $bucket, $uri, $acl=self::ACL_PRIVATE, $metaHeaders=array(), $contentType=null) |
| static | putObjectString ($string, $bucket, $uri, $acl=self::ACL_PRIVATE, $metaHeaders=array(), $contentType= 'text/plain') |
| static | getObject ($bucket, $uri, $saveTo=false) |
| static | getObjectInfo ($bucket, $uri, $returnInfo=true) |
| static | copyObject ($srcBucket, $srcUri, $bucket, $uri, $acl=self::ACL_PRIVATE) |
| static | setBucketLogging ($bucket, $targetBucket, $targetPrefix=null) |
| static | getBucketLogging ($bucket) |
| static | disableBucketLogging ($bucket) |
| static | getBucketLocation ($bucket) |
| static | setAccessControlPolicy ($bucket, $uri= '', $acp=array()) |
| static | getAccessControlPolicy ($bucket, $uri= '') |
| static | deleteObject ($bucket, $uri) |
| static | getAuthenticatedURL ($bucket, $uri, $lifetime, $hostBucket=false, $https=false) |
| static | createDistribution ($bucket, $enabled=true, $cnames=array(), $comment= '') |
| static | getDistribution ($distributionId) |
| static | updateDistribution ($dist) |
| static | deleteDistribution ($dist) |
| static | listDistributions () |
| static | __getMimeType (&$file) |
| static | __getSignature ($string) |
Data Fields | |
| const | ACL_PRIVATE = 'private' |
| const | ACL_PUBLIC_READ = 'public-read' |
| const | ACL_PUBLIC_READ_WRITE = 'public-read-write' |
Static Public Attributes | |
| static | $useSSL = true |
Copyright (c) 2008, Donovan Schönknecht. All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Amazon S3 is a trademark of Amazon.com, Inc. or its affiliates. Amazon S3 PHP class
| __construct | ( | $ | accessKey = null, |
| $ | secretKey = null, |
||
| $ | useSSL = true |
||
| ) |
| static __getMimeType | ( | &$ | file | ) | [static] |
| static __getSignature | ( | $ | string | ) | [static] |
| static copyObject | ( | $ | srcBucket, |
| $ | srcUri, | ||
| $ | bucket, | ||
| $ | uri, | ||
| $ | acl = self::ACL_PRIVATE |
||
| ) | [static] |
| static createDistribution | ( | $ | bucket, |
| $ | enabled = true, |
||
| $ | cnames = array(), |
||
| $ | comment = '' |
||
| ) | [static] |
| static deleteBucket | ( | $ | bucket | ) | [static] |
| static deleteDistribution | ( | $ | dist | ) | [static] |
Delete a CloudFront distribution
| array | $dist | Distribution array info identical to output of getDistribution() |
| static deleteObject | ( | $ | bucket, |
| $ | uri | ||
| ) | [static] |
| static disableBucketLogging | ( | $ | bucket | ) | [static] |
| static getAccessControlPolicy | ( | $ | bucket, |
| $ | uri = '' |
||
| ) | [static] |
| static getAuthenticatedURL | ( | $ | bucket, |
| $ | uri, | ||
| $ | lifetime, | ||
| $ | hostBucket = false, |
||
| $ | https = false |
||
| ) | [static] |
Get a query string authenticated URL
| string | $bucket | Bucket name |
| string | $uri | Object URI |
| integer | $lifetime | Lifetime in seconds |
| boolean | $hostBucket | Use the bucket name as the hostname |
| boolean | $https | Use HTTPS ($hostBucket should be false for SSL verification) |
| static getBucket | ( | $ | bucket, |
| $ | prefix = null, |
||
| $ | marker = null, |
||
| $ | maxKeys = null, |
||
| $ | delimiter = null |
||
| ) | [static] |
| static getBucketLocation | ( | $ | bucket | ) | [static] |
| static getBucketLogging | ( | $ | bucket | ) | [static] |
| static getDistribution | ( | $ | distributionId | ) | [static] |
Get CloudFront distribution info
| string | $distributionId | Distribution ID from listDistributions() |
| static getObject | ( | $ | bucket, |
| $ | uri, | ||
| $ | saveTo = false |
||
| ) | [static] |
| static getObjectInfo | ( | $ | bucket, |
| $ | uri, | ||
| $ | returnInfo = true |
||
| ) | [static] |
Create input info array for putObject()
| string | $file | Input file |
| mixed | $md5sum | Use MD5 hash (supply a string if you want to use your own) |
| static inputResource | ( | &$ | resource, |
| $ | bufferSize, | ||
| $ | md5sum = '' |
||
| ) | [static] |
Create input array info for putObject() with a resource
| string | $resource | Input resource to read from |
| integer | $bufferSize | Input byte size |
| string | $md5sum | MD5 hash to send (optional) |
| static listBuckets | ( | $ | detailed = false | ) | [static] |
| static listDistributions | ( | ) | [static] |
| static putBucket | ( | $ | bucket, |
| $ | acl = self::ACL_PRIVATE, |
||
| $ | location = false |
||
| ) | [static] |
| static putObject | ( | $ | input, |
| $ | bucket, | ||
| $ | uri, | ||
| $ | acl = self::ACL_PRIVATE, |
||
| $ | metaHeaders = array(), |
||
| $ | requestHeaders = array() |
||
| ) | [static] |
Put an object
| mixed | $input | Input data |
| string | $bucket | Bucket name |
| string | $uri | Object URI |
| constant | $acl | ACL constant |
| array | $metaHeaders | Array of x-amz-meta-* headers |
| array | $requestHeaders | Array of request headers or content type as a string |
Definition at line 284 of file S3.php.


| static putObjectFile | ( | $ | file, |
| $ | bucket, | ||
| $ | uri, | ||
| $ | acl = self::ACL_PRIVATE, |
||
| $ | metaHeaders = array(), |
||
| $ | contentType = null |
||
| ) | [static] |
Put an object from a file (legacy function)
| string | $file | Input file path |
| string | $bucket | Bucket name |
| string | $uri | Object URI |
| constant | $acl | ACL constant |
| array | $metaHeaders | Array of x-amz-meta-* headers |
| string | $contentType | Content type |
Definition at line 359 of file S3.php.

| static putObjectString | ( | $ | string, |
| $ | bucket, | ||
| $ | uri, | ||
| $ | acl = self::ACL_PRIVATE, |
||
| $ | metaHeaders = array(), |
||
| $ | contentType = 'text/plain' |
||
| ) | [static] |
Put an object from a string (legacy function)
| string | $string | Input data |
| string | $bucket | Bucket name |
| string | $uri | Object URI |
| constant | $acl | ACL constant |
| array | $metaHeaders | Array of x-amz-meta-* headers |
| string | $contentType | Content type |
Definition at line 375 of file S3.php.

| static setAccessControlPolicy | ( | $ | bucket, |
| $ | uri = '', |
||
| $ | acp = array() |
||
| ) | [static] |
| static setAuth | ( | $ | accessKey, |
| $ | secretKey | ||
| ) | [static] |
| static setBucketLogging | ( | $ | bucket, |
| $ | targetBucket, | ||
| $ | targetPrefix = null |
||
| ) | [static] |
Set logging for a bucket
| string | $bucket | Bucket name |
| string | $targetBucket | Target bucket (where logs are stored) |
| string | $targetPrefix | Log prefix (e,g; domain.com-) |
Definition at line 471 of file S3.php.


| static updateDistribution | ( | $ | dist | ) | [static] |
Update a CloudFront distribution
| array | $dist | Distribution array info identical to output of getDistribution() |
| const ACL_PRIVATE = 'private' |
| const ACL_PUBLIC_READ = 'public-read' |
| const ACL_PUBLIC_READ_WRITE = 'public-read-write' |