Files
fdn2/app/private/lib/backup/cbsClient/CBSClient.php
T
2022-08-29 23:20:16 +02:00

29 lines
1.1 KiB
PHP

<?php
/*
Author: Riccardo Di Dato
Creation Date: 18/feb/2016
*/
/**
* Classe semplificare l'implementazione del client
* @author Riccardo Di Dato
*/
class CBSClient extends RAPI_ClientHelper{
/**
* La classe si occupa già di costruire il RAPI_Client e di implementare i metodi dell'helper
* @param RAPI_Logger $logger
* @param RAPI_DataStorage $dataStorage
* @param string $receivedAttachmentPath
*/
public function __construct(RAPI_Logger $logger, CBSClient_DataStorageBase $dataStorage, $receivedAttachmentPath){
parent::__construct(new CBS_RAPIClientImplementation($logger, $dataStorage, $receivedAttachmentPath));
$this->defineRequest("getBackups", "RAPI_BackupListRequestDetails", new RAPI_SingleValueResponseFetcher("list"));
$this->defineRequest("sendBackup", "RAPI_CreateBackupRequestDetails", new RAPI_SingleValueResponseFetcher("id"));
// $this->defineRequest("getBackup", "RAPI_GetBackupRequestDetails", new RAPI_StandardResponseFetcher(function($d){$d->content = utf8_decode($d->content); return $d; }));
$this->defineRequest("getBackup", "RAPI_GetBackupRequestDetails", new RAPI_StandardResponseFetcher());
}
}
?>