Download the PHP package argentcrusade/selectel-cloud-storage without Composer

On this page you can find all versions of the php package argentcrusade/selectel-cloud-storage. 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 selectel-cloud-storage

argentcrusade/selectel-cloud-storage

Build Status StyleCI ScrutinizerCI Latest Version on Packagist

Unofficial PHP SDK for Selectel Cloud Storage API.

Requirements

This package requires PHP 5.6 or higher.

Installation

You can install the package via composer:

Usage

Initialize Storage

CloudStorage

ArgentCrusade\Selectel\CloudStorage\CloudStorage class allows you to access and create containers.

Containers Collection

CloudStorage::containers method returns instance of ArgentCrusade\Selectel\CloudStorage\Collections\Collection class with retrieved containers objects. This collection object implements ArrayAccess, Countable, Iterator and JsonSerializable interfaces, what makes you able to do these things:

Container Instance

Container that you've retrieved from Containers Collection is an ArgentCrusade\Selectel\CloudStorage\Container instance object which implements Countable and JsonSerializable interfaces.

Fluent Files Loader

You can use instance of ArgentCrusade\Selectel\CloudStorage\FluentFilesLoader class to retrieve files from container. Fluent loader returns Collection of file arrays or Collection of File objects.

This instance is accesible from $container->files() method and allows you to do following things:

If you need to create FluentFilesLoader instance without Container instance, use following code:

File Uploads

Container class provides uploadFromString method to upload file contents and uploadFromStream method to upload file from stream.

Both methods accepts array $params as third optional argument.

Also, uploadFromString method accepts 4th argument bool $verifyChecksum. If true, Selectel will perform MD5 checksum comparison and if something went wrong during upload process, it won't accept file and exception will be thrown. This option is enabled by default for uploadFromString method.

File Instance

When you retrieve collection of files via Contrainer::files method you get Collection of file arrays:

But when you're using Container::files()->find method, you receive instance of ArgentCrusade\Selectel\CloudStorage\File class that implements JsonSerializable interface. With this object you can perform operations such as renaming, copying and deleting file.

If you need to transform file from array to File instance you can use Container::getFileFromArray method:

Also, you can use Container::getFilesCollectionFromArrays method to convert files Collection or array of file arrays to Collection of File instances:

Fluent loader (FluentFilesLoader) can also return Collection of file objects by calling asFileObjects method before get method (see Fluent Files Loader section).

Warning: converting a lot of files to File instances may result in performance loss.

Change log

Please see CHANGELOG for more information on what has changed recently.

Testing

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

License

The MIT License (MIT). Please see License File for more information.


All versions of selectel-cloud-storage with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6
guzzlehttp/guzzle Version ^6.2
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 argentcrusade/selectel-cloud-storage contains the following files

Loading the files please wait ....