-
Notifications
You must be signed in to change notification settings - Fork 251
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
implemented event callback function #236
- Loading branch information
Showing
2 changed files
with
108 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
<?php | ||
/** | ||
* Events handlers of API operations. | ||
* | ||
* @license MIT License | ||
* @author Pavel Solomienko <https://github.com/servocoder/> | ||
* @copyright Authors | ||
*/ | ||
|
||
/** | ||
* Event listener on after "getfolder" API method successfully executed. | ||
* | ||
* @param \RFM\Event\Api\AfterFolderReadEvent $event | ||
*/ | ||
function fm_event_api_after_folder_read($event) | ||
{ | ||
$data = $event->getFolderData(); | ||
$list = $event->getFolderContent(); | ||
} | ||
|
||
/** | ||
* Event listener on after "addfolder" API method successfully executed. | ||
* | ||
* @param \RFM\Event\Api\AfterFolderCreateEvent $event | ||
*/ | ||
function fm_event_api_after_folder_create($event) | ||
{ | ||
$data = $event->getFolderData(); | ||
} | ||
|
||
/** | ||
* Event listener on after "upload" API method successfully executed. | ||
* | ||
* @param \RFM\Event\Api\AfterFileUploadEvent $event | ||
*/ | ||
function fm_event_api_after_file_upload($event) | ||
{ | ||
$data = $event->getUploadedFileData(); | ||
} | ||
|
||
/** | ||
* Event listener on after "extract" API method successfully executed. | ||
* | ||
* @param \RFM\Event\Api\AfterFileExtractEvent $event | ||
*/ | ||
function fm_event_api_after_file_extract($event) | ||
{ | ||
$data = $event->getArchiveData(); | ||
$list = $event->getArchiveContent(); | ||
} | ||
|
||
/** | ||
* Event listener on after "rename" API method successfully executed. | ||
* | ||
* @param \RFM\Event\Api\AfterItemRenameEvent $event | ||
*/ | ||
function fm_event_api_after_item_rename($event) | ||
{ | ||
$data = $event->getItemData(); | ||
$originalData = $event->getOriginalItemData(); | ||
} | ||
|
||
/** | ||
* Event listener on after "copy" API method successfully executed. | ||
* | ||
* @param \RFM\Event\Api\AfterItemCopyEvent $event | ||
*/ | ||
function fm_event_api_after_item_copy($event) | ||
{ | ||
$data = $event->getItemData(); | ||
$originalData = $event->getOriginalItemData(); | ||
} | ||
|
||
/** | ||
* Event listener on after "move" API method successfully executed. | ||
* | ||
* @param \RFM\Event\Api\AfterItemMoveEvent $event | ||
*/ | ||
function fm_event_api_after_item_move($event) | ||
{ | ||
$data = $event->getItemData(); | ||
$originalData = $event->getOriginalItemData(); | ||
} | ||
|
||
/** | ||
* Event listener on after "delete" API method successfully executed. | ||
* | ||
* @param \RFM\Event\Api\AfterItemDeleteEvent $event | ||
*/ | ||
function fm_event_api_after_item_delete($event) | ||
{ | ||
$data = $event->getOriginalItemData(); | ||
} | ||
|
||
/** | ||
* Event listener on after "download" API method successfully executed. | ||
* | ||
* @param \RFM\Event\Api\AfterItemDownloadEvent $event | ||
*/ | ||
function fm_event_api_after_item_download($event) | ||
{ | ||
$data = $event->getDownloadedItemData(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters