#Aspose Cloud SDK for PHP Repository
This repository holds Aspose Cloud SDK for PHP source code. This SDK allows you to work with Aspose REST API in your PHP applications quickly and easily.
Add the following line to your composer.json file:
// composer.json
{
require: {
"aspose/cloud-sdk-php": "~1.1"
}
}
Install the new dependencies by running composer update
from the directory where your composer.json file is located.
##What's included in this SDK repository?
Module | Description |
---|---|
Common | This module provides the features commonly used by other sections of the SDK. |
Storage | This module provides the features to work with Aspose storage. |
This module provides the features to manipulate PDF file formats using Aspose.Pdf for Cloud. | |
Words | This module provides the features to manipulate word processing file formats using Aspose.Words for Cloud. |
Cells | This module provides the features to manipulate spreadsheet file formats using Aspose.Cloud for Cloud. |
Slides | This module provides the features to manipulate presentations file formats using Aspose.Slides for Cloud. |
BarCode | This module provides the features to create and detect BarCodes images using Aspose.BarCode for Cloud. |
This module provides the features to manipulate email file formats using Aspose.Email for Cloud. | |
OCR | This module provides the features to detect text from images using Aspose.OCR for Cloud. |
Imaging | This module provides the features to process image file formats using Aspose.Imaging for Cloud. |
Tasks | This module provides the features to process Microsoft Project file formats using Aspose.Tasks for Cloud. |
In order to manipulate any files, you first need to upload them to the Aspose Cloud storage using Storage module.
The Aspose Cloud SDK for PHP allows you to save the output files at your specified location.
The SDK allows you to alter the calls made by connecting EventListeners
. You can simply register a php callable in your code by using the following example:
use Aspose\Cloud\Common\AsposeApp;
use Aspose\Cloud\Event\ProcessCommandEvent;
$dispatcher = AsposeApp::getEventDispatcher();
$dispatcher->addListener(ProcessCommandEvent::PRE_CURL, function (ProcessCommandEvent $event) {
// will be executed when the ProcessCommandEvent::PRE_CURL event is dispatched
curl_setopt($event->getSession(), CURLOPT_TIMEOUT, 60);
});
The SDK currenlty dispatches the following events. Please use the Event class constants in your code to register to the specific events.
Module | Event names | Description |
---|---|---|
Utils | ProcessCommandEvent::PRE_CURL | Allows you to alter the curl session before the call is executed. |
Utils | ProcessCommandEvent::POST_CURL | Allows you to alter the curl session and response after the curl request is executed, but before the curl session is closed. |
Utils | ValidateOutputEvent::VALIDATE_OUTPUT | Allows you to add extra validation on the result, by altering the invalid variable. |
Pdf & Document | SplitPageEvent::PAGE_IS_SPLIT | Triggers after a SDK split call, for each page that was split. This allows you to use the `$outputFile` and `$pageNumber` directly after it was saved by `Utils::saveFile`. |
For SDK API Ref Docs, please go through API Docs. For SDK Usage Examples, please go through wiki. For Aspose Cloud APIs related help, please go through Aspose.Total for Cloud.
Start a free trial today – all you need is to sign up with Aspose for Cloud service. Once you have signed up, you are ready to try powerful file processing features offered by Aspose for Cloud.