1. Go to this page and download the library: Download emstorage/php-sdk library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
$file = new EmObject();
$file->setFilename($path);
$remoteFile = $emStorage->object->createFromObject($file);
// warning: returned $remoteFile is not the same instance as $file, TODO ?
class Collection implements \ArrayAccess, \Countable, \Iterator
{
}
use Awelty\Component\Security\HmacSignatureProvider;
use Emonsite\Emstorage\PhpSdk\Client;
// Emstorage use hmac authentification with sha1 as algo
$signatureProvider = new HmacSignatureProvider($publicKey, $privateKey, 'sha1');
// create as many clients as you need (typically one per EmStorageApplication)
$emStorage = new Client($authenticator, $someGuzzleConfig = []);
interface ObjectSummaryInterface
{
/**
* @return string
*/
public function getId();
/**
* @return string
*/
public function getFilename();
/**
* @return string
*/
public function getPublicUrl();
/**
* @return string
*/
public function getMime();
/**
* @return float
*/
public function getSize();
/**
* @return string
*/
public function getSizeHuman();
/**
* @return array
*/
public function getMeta();
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.