2017 © Pedro Peláez
 

library ceph-client

Provides a CephClient for storing files in PHP.

image

adimihaila/ceph-client

Provides a CephClient for storing files in PHP.

  • Saturday, May 26, 2018
  • by adrianmihaila
  • Repository
  • 0 Watchers
  • 1 Stars
  • 2 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 100 % Grown

The README.md

CephClient Build Status

Provides a CephClient for storing files in PHP., (*1)

Installation

composer require adimihaila/ceph-client

Usage

<?php

use Aws\S3\S3Client;
use AdiMihaila\CephClient;

$s3Client = new S3Client([
    'version' => 'latest',
    'region' => '',
    'endpoint' => 'CEPH_ENDPOINT',
    'credentials' => [
        'key' => 'CEPH_KEY',
        'secret' => 'CEPH_SECRET',
    ],
]);

$client = new CephClient($s3Client);

// Create a new bucket.
$bucketName = 'BUCKET_NAME';
$client->createBucket($bucketName);

// Dump all existing buckets.
foreach ($client->getBuckets() as $bucket) {
    var_dump($bucket);
}

// Put a file in the new bucket and dump the result.
$file = 'https://www.google.com/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png';
$result = $client->putFile($bucketName, $file);
var_dump($result);

// Get the new file from bucket and dump the result.
$fileName = basename($file);
$result = $client->getFile($bucketName, $fileName);
var_dump($result);

The Versions

26/05 2018

dev-master

9999999-dev https://github.com/adrianmihaila/working-with-ceph-in-php

Provides a CephClient for storing files in PHP.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Adrian Mihaila

php aws s3 storage ceph client

26/05 2018

1.0.0

1.0.0.0 https://github.com/adrianmihaila/working-with-ceph-in-php

Provides a CephClient for storing files in PHP.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Adrian Mihaila

php aws s3 storage ceph client