Aspose Cloud

Aspose Cloud is a cloud-based document generation, conversion and automation platform for developers. Before Aspose Cloud APIs document processing and manipulation tasks were not so easy. Aspose Cloud APIs give developers full control over documents and file formats. Each API has been developed to offer you a wide range of features for file processing in cloud. Aspose Cloud REST APIs are platform independent and can be utilized across any platform such as Node.js, Amazon, Salesforce etc. without any installation. Being language independent makes it a suitable choice for the developers having expertise in any programming language. We also provide SDKs in different programming languages such as .NET, Java, PHP, Ruby, Node.js, ZF 2.0 and Symfony2. Learn More

EventDispatcher Feature in the Aspose Cloud PHP SDK

We are pleased to announce that Richard Van Laak (Aspose Cloud customer) has helped us to add EventDispatcher feature in Aspose Cloud PHP SDK. There are happening a lot of events in the SDK, which are interesting enough to get information about. By implementing a event dispatcher and triggering events through the most important classes of the SDK, it is possible to monitor how long the processing takes and developer can manually add extra curl headers to each command, by triggering a “util.processCommand” event.

Aspose Cloud SDK for PHP Installation

Aspose Cloud SDK for PHP can be installed using “Composer” from any of the following places:

Usage Example

Make use of the EventDispatcher

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); 
}); 

You can go through readme file to read about the available events.

Start a Free Trial Today

Start a free trial today – all you need is to sign up with the Aspose Cloud service. Once you have signed up, you are ready to try the powerful file processing features offered by Aspose Cloud.

Contributed By: Richard van Laak