2017 © Pedro Peláez
 

library selectel-storage-api

Selectel Storage API for PHP

image

fhteam/selectel-storage-api

Selectel Storage API for PHP

  • Monday, August 10, 2015
  • by FractalizeR
  • Repository
  • 6 Watchers
  • 5 Stars
  • 2,429 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 2 Open issues
  • 6 Versions
  • 11 % Grown

The README.md

selectel-storage-api

Selectel Cloud Storage API., (*1)

Composer setup

Please do note, that package name changed to fhteam/selectel-storage-api. Old name should still work, though it will no longer be maintained., (*2)

    "require": {
        "fhteam/selectel-storage-api": "dev-master"
    }

Authenticating

    $config = include(__DIR__ . '/../data/config.php');
    $container = new Container($config['auth_container']);

    $auth = new CredentialsAuthentication($config['auth_user'], $config['auth_key'], $config['auth_url']);
    $auth->authenticate();

Uploading a file

    $file = new File('test.txt');
    $file->setLocalName(__DIR__ . '/../data/config.php');
    $file->setSize();

    $service = new StorageService($auth);
    $service->uploadFile($container, $file);

Deleting a file

    $file = new File('test.txt');
    $service = new StorageService($auth);
    $service->deleteFile($container, $file);

Parallel operations

If you need to do an operation over several files, consider using parallel versions of operations. When using parallel versions of operations requests are sent to Selectel simultaneously. Execution blocks until all replies are received from server., (*3)

For uploadFile() there is uploadFiles(), accepting an array of files to be uploaded into the container. For deleteFile() deleteFiles() is also available etc., (*4)

If a parallel operation fails, ParallelOperationException is raised with $errors field ready for inspection, (*5)

The Versions

10/08 2015

dev-version_20

dev-version_20

Selectel Storage API for PHP

  Sources   Download

GPL-2.0

The Requires

 

The Development Requires

17/06 2015
01/04 2015

1.1

1.1.0.0

Selectel Storage API for PHP

  Sources   Download

GPL-2.0

The Requires

 

The Development Requires

06/11 2014

v1.0.1

1.0.1.0

Selectel Storage API for PHP

  Sources   Download

GPL-2.0

The Requires

 

The Development Requires

06/11 2014

v1.0.0

1.0.0.0

Selectel Storage API for PHP

  Sources   Download

GPL-2.0

The Requires

 

The Development Requires