{"action":"closed","issue":{"url":"https://api.github.com/repos/asposeforcloud/Aspose_Cloud_SDK_For_PHP/issues/21","labels_url":"https://api.github.com/repos/asposeforcloud/Aspose_Cloud_SDK_For_PHP/issues/21/labels{/name}","comments_url":"https://api.github.com/repos/asposeforcloud/Aspose_Cloud_SDK_For_PHP/issues/21/comments","events_url":"https://api.github.com/repos/asposeforcloud/Aspose_Cloud_SDK_For_PHP/issues/21/events","html_url":"https://github.com/asposeforcloud/Aspose_Cloud_SDK_For_PHP/issues/21","id":52757056,"number":21,"title":"Implementation of Event Dispatcher","user":{"login":"Rvanlaak","id":2707563,"avatar_url":"https://avatars.githubusercontent.com/u/2707563?v=3","gravatar_id":"","url":"https://api.github.com/users/Rvanlaak","html_url":"https://github.com/Rvanlaak","followers_url":"https://api.github.com/users/Rvanlaak/followers","following_url":"https://api.github.com/users/Rvanlaak/following{/other_user}","gists_url":"https://api.github.com/users/Rvanlaak/gists{/gist_id}","starred_url":"https://api.github.com/users/Rvanlaak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Rvanlaak/subscriptions","organizations_url":"https://api.github.com/users/Rvanlaak/orgs","repos_url":"https://api.github.com/users/Rvanlaak/repos","events_url":"https://api.github.com/users/Rvanlaak/events{/privacy}","received_events_url":"https://api.github.com/users/Rvanlaak/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2014-12-23T17:03:05Z","updated_at":"2015-01-23T07:33:47Z","closed_at":"2015-01-23T07:33:47Z","body":"There are happening a lot of events in the SDK, which probably are interesting enought to get information about. By implementing a event dispatcher, and triggering events through the most important classes of the SDK, it will be possible for example to:\r\n\r\n1. Add the [Stopwatch component](http://symfony.com/doc/current/components/stopwatch.html) in the [AsposeCloudBundle](https://github.com/asposeforcloud/asposesymfony) to monitor how long the processing takes\r\n2. Manually add extra curl headers to each command, by triggering a 'util.processCommand' event\r\n3. Register a listener to the [`Your pricing plan allows only` exception](https://github.com/asposeforcloud/Aspose_Cloud_SDK_For_PHP/blob/master/src/Aspose/Cloud/Common/Utils.php#L119), so users can do something usefull with this\r\n4. Register a listener to the `Utils::validateOutput` function to add some extra validation for their own calls\r\n\r\nImplementing an EventDispatcher will not break any code because no calls from the api do rely on anything but the classes from the `/Common` folder yet. Shall I start with making a first implementation?"}}