aspose / storage-sdk-php
This repository contains Aspose Storage Cloud SDK for PHP source code. Aspose Storage Cloud SDK for PHP is a true REST API that provides managers for multiple storage types.
Installs: 5 700
Dependents: 6
Suggesters: 0
Security: 0
Stars: 0
Watchers: 3
Forks: 2
Open Issues: 3
Requires
- php: >=5.5
- ext-curl: *
- ext-json: *
- ext-mbstring: *
- guzzlehttp/guzzle: ^6.2
Requires (Dev)
- friendsofphp/php-cs-fixer: 2.10.*
- phpunit/phpunit: ^4.8
- squizlabs/php_codesniffer: 3.*
This package is not auto-updated.
Last update: 2024-11-15 01:32:06 UTC
README
This repository contains Aspose.Storage Cloud SDK for PHP source code. This SDK allows you to work with Aspose.Storage Cloud REST APIs in your PHP applications quickly and easily, with zero initial cost. See API Reference for full API specification.
How to use the SDK?
The complete source code is available in this repository folder. You can either directly use it in your project via source code or get Packagist distribution (recommended). For more details, please visit our documentation website.
Prerequisites
To use Aspose Storage for Cloud PHP SDK you need to register an account with Aspose Cloud and lookup/create App Key and SID at Cloud Dashboard. There is free quota available. For more details, see Aspose Cloud Pricing.
Installation
Via Composer:
storage-sdk-php is available on Packagist as the
storage-sdk-php
package. Run the following command:
composer require aspose/storage-sdk-php
To use the SDK, use Composer's autoload:
require_once('vendor/autoload.php');
Sample usage
$config = new Configuration(); $config->setAppKey('AppKey')->setAppSid('AppSid'); $storageApi = new StorageApi($config); $path = "path/FileName.pdf"; $version_id = null; $storage = "StorageName"; $request = new Requests\GetDownloadRequest($path, $version_id, $storage); $result = $storageApi->getDownload($request);
Tests contain various examples of using the SDK. Please put your credentials into Configuration.
Dependencies
- PHP 5.6 or later
- referenced packages (see here for more details)
Comparison with Old generation SDK
New SDK has the following advantages over the previous version:
- Classes, methods and properties have comments and are IDE-friendly
- Better security
- Usage of Request/Response classes to represent long lists of parameters. This allows for cleaner code and easier backwards-compatibility going forward
New SDK is not backwards compatible with previous generation because of the last item. It should be straightforward to convert your code to using Request/Response objects, if you need any help on migration please ask at Free Support Forums.