コード例 #1
0
ファイル: sample06.php プロジェクト: groupdocs/groupdocs-php
 //Create signer object
 $signature = new GroupDocsRequestSigner($privateKey);
 //Create apiClient object
 $apiClient = new APIClient($signature);
 //Create Storage Api object
 $signatureApi = new SignatureApi($apiClient);
 //Create AsyncApi object
 $asyncApi = new AsyncApi($apiClient);
 //Check if user entered base path
 if ($basePath == "") {
     //If base base is empty seting base path to prod server
     $basePath = 'https://api.groupdocs.com/v2.0';
 }
 //Set base path
 $signatureApi->setBasePath($basePath);
 $asyncApi->setBasePath($basePath);
 //Create setting variable for signature SignDocument method
 $settings = new SignatureSignDocumentSettingsInfo();
 $settings->documents = array(get_object_vars($document));
 $settings->signers = array(get_object_vars($signer));
 //###Make a request to Signature Api for sign document
 //Sign document using current user id and sign settings
 try {
     $response = $signatureApi->SignDocument($clientId, $settings);
     $iframe = "";
     //Check is file signed and uploaded successfully
     if ($response->status == "Ok") {
         sleep(5);
         try {
             $getDocumentStatus = $signatureApi->GetSignDocumentStatus($clientId, $response->result->jobId);
             //Get file guid
コード例 #2
0
ファイル: sample31.php プロジェクト: groupdocs/groupdocs-php
 $docApi = new DocApi($apiClient);
 //Create Storage Api object
 $apiStorage = new StorageApi($apiClient);
 //Create AsyncApi object
 $api = new AsyncApi($apiClient);
 $mergApi = new MergeApi($apiClient);
 $signatureApi = new SignatureApi($apiClient);
 //Set url to choose whot server to use
 if ($basePath == "") {
     //If base base is empty seting base path to prod server
     $basePath = 'https://api.groupdocs.com/v2.0';
 }
 //Set base path
 $docApi->setBasePath($basePath);
 $apiStorage->setBasePath($basePath);
 $api->setBasePath($basePath);
 $mergApi->setBasePath($basePath);
 $signatureApi->setBasePath($basePath);
 //Get entered by user data
 $name = F3::get('POST["name"]');
 $lastName = "lastName";
 $email = F3::get('POST["email"]');
 $country = F3::get('POST["country"]');
 $city = F3::get('POST["city"]');
 $street = F3::get('POST["street"]');
 F3::set("email", $email);
 F3::set("country", $country);
 F3::set("name", $name);
 F3::set("lastName", $lastName);
 F3::set("street", $street);
 F3::set("city", $city);