Download the PHP package matecat/simple-s3 without Composer

On this page you can find all versions of the php package matecat/simple-s3. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package simple-s3

Simple S3 Client

[license]() [Packagist]() Scrutinizer Code Quality Code Coverage

Simple S3 Client is a simple wrapper of the official SDK PHP Client.

Basic Usage

To instantiate the Client do the following:

Please note that if you don't provide the credentials array, the Client will try to get values from the following environments variables on your system as the original S3Client:

If you instead want to authenticate assuming an IAM Role in another AWS Account do the following:

For further config details please refer to the official documentation:

Configuration for the AWS SDK for PHP Version 3

Methods

Here is the list of Client's public methods:

Naming validation for buckets and objects

Please refer to the official AWS policy:

The Client comes with two validators:

These two classes throws you an if the name provided is not compliant with the AWS rule conventions.

Validators are invoked in Client's , and methods.

Objects name escaping

Please read carefully the object safe naming rules.

Escaping object names is entirely up to you.

You can use the provided class, or inject in Client your own encoder if you prefer, but please note that it MUST implement

interface:

Filename trimming

As the Amazon official documentation reports, the filename max size on S3 is 1024 characters.

But you MUST be aware of filename max size of your operating system.

For example, if you run the application on a Linux system, this limit is 255 bytes, so you cannot download a file with a name which exceeds this value.

S3Client comes with a FilenameTrimmer helper class, which automatically trims the filenames. Default limit value is 255.

To override this limit, use setFilenameMaxSize method:

Bucket lifecycle

You can set the basic lifecycle for your bucket with method.

For further details please refer to the bucket lifecycle configuration official API documentation.

Bucket policy

You can set the bucket policy using method. Consider the following example:

You can grab bucket policy and delete it by using respectively and methods.

For further details please refer to the bucket policy official API documentation.

Bucket versioning

You can enable bucket versioning:

And now, when you use method, a tag will be added to keys:

For further details please refer to the bucket versioning official API documentation.

Restoring an item

You can use to send a restore an archived object. You can choose between three retrieval options:

For further details please refer to the official documentation:

Restore an archived object

Caching

In order speed up data retrieval, you can inject a cache handler. Please note that the cache MUST implement . The client comes with a Redis implementation:

Now method will get the elements directly from cache. Please note that caching works ONLY if you provide a prefix to the method:

If you need to skip the cache you can add an extra parameter called exclude-cache:

Commands

If you have an application which uses Symfony Console, you have some commands available:

You can register the commands in your app, consider this example:

Logging

You can inject your logger to log every Client outcome call. Please note that your logger MUST be PSR-3 compliant:

Support

If you found an issue or had an idea please refer to this section.

Authors

License

This project is licensed under the MIT License - see the LICENSE.md file for details


All versions of simple-s3 with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6
predis/predis Version ^2.0
aws/aws-sdk-php Version ^3.322
ext-curl Version ^7.3
ext-fileinfo Version ^7.3
ext-redis Version *
ext-json Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package matecat/simple-s3 contains the following files

Loading the files please wait ....