Recommend this page to a friend! |
![]() |
Info | Demos | ![]() |
![]() |
![]() |
Reputation | Support forum | Blog | Links |
Ratings | Unique User Downloads | Download Rankings | ||||
Not yet rated by the users | Total: 174 | All time: 8,789 This week: 206![]() |
Version | License | PHP version | Categories | |||
aws-s3-wrapper 1.0.1 | MIT/X Consortium ... | 5.4 | PHP 5, Files and Folders, Cache, Web ... |
Description | Author | |
This class can retrieve and cache AWS S3 files using the SDK. |
|
This wrapper allows minimizing S3 access, maintaining a local cache (on server).
add to the composer.json file of your project {
...
"require": {
...
"jlaso/aws-s3-wrapper": "dev-master",
...
}
}
and run `
composer update`
or run
#Configuration
You can use the src/config.ini (created from src/config.ini.sample) in order to simplify access to the wrapper with
S3Wrapper::getInstance().
Or you can create your own instance passing the data the wrapper needs to be created:
new S3Wrapper($accessKey, $secretKey, $bucket);
#Permissions
You have to create cache folder and give 0755 permissions. Likely you have to change the owner/group to apache user/group.
#Test
In order to OOB test you can use the file samples/basic.php.
#Use
###Fetch the content o a file.
$s3 = new S3Wrapper($access, $secretm $bucket); $s3->getFileIfNewest($localFile, $remoteFile); // you have now the contents of $remoteFile on $localFile
###Save a file.
$s3 = new S3Wrapper($access, $secretm $bucket); $s3->saveFile($remoteFile, $content);
###Get the list of files.
$s3 = new S3Wrapper($access, $secretm $bucket); $fileList = $s3->getFilesList($path);
###Delete a file
$s3 = new S3Wrapper($access, $secretm $bucket); $s3->deleteFile($localFile, $remoteFile);
![]() |
File | Role | Description | ||
---|---|---|---|---|
![]() |
||||
![]() |
||||
![]() ![]() |
Data | Auxiliary data | ||
![]() ![]() |
Lic. | License text | ||
![]() ![]() |
Doc. | Documentation |
The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page. |
![]() |
Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
100% |
|
|
Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.