You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+27-14
Original file line number
Diff line number
Diff line change
@@ -74,11 +74,11 @@ You can include the SDK to your project using:
74
74
- Install **PHP SDK**.
75
75
76
76
- Navigate to the workspace of your client app.
77
-
77
+
78
78
- Run the command below:
79
79
80
80
```sh
81
-
composer require zohocrm/php-sdk:3.0.1
81
+
composer require zohocrm/php-sdk:3.0.2
82
82
```
83
83
84
84
- The PHP SDK will be installed and a package named vendor will be created in the workspace of your client app.
@@ -90,7 +90,7 @@ You can include the SDK to your project using:
90
90
```php
91
91
require 'vendor/autoload.php';
92
92
```
93
-
93
+
94
94
Through this line, you can access all the functionalities of the PHP SDK. The namespaces of the class to be used must be included within the "use" statement.
95
95
96
96
## Token Persistence
@@ -246,7 +246,7 @@ class CustomStore implements TokenStore
246
246
247
247
/**
248
248
* @return array An array of Token (com\zoho\api\authenticator\OAuthToken) class instances
249
-
*/
249
+
*/
250
250
public functiongetTokens()
251
251
{
252
252
//Add code to retrieve all the stored tokens
@@ -322,7 +322,7 @@ Before you get started with creating your PHP application, you need to register
322
322
323
323
$tokenstore = new DBStore("hostName", "dataBaseName", "userName", "password", "portNumber");
324
324
325
-
// $tokenstore = new FileStore("absolute_file_path");
325
+
// $tokenstore = new FileStore("absolute_file_path");
326
326
```
327
327
328
328
- Create an instance of SDKConfig containing SDK configurations.
@@ -349,7 +349,11 @@ Before you get started with creating your PHP application, you need to register
349
349
350
350
$enableSSLVerification = true;
351
351
352
-
$sdkConfig = (new SDKConfigBuilder())->setAutoRefreshFields($autoRefreshFields)->setPickListValidation($pickListValidation)->setSSLVerification($enableSSLVerification)->build();
352
+
$connectionTimeout = 2; //The number of seconds to wait while trying to connect. Use 0 to wait indefinitely.
353
+
354
+
$timeout = 2; //The maximum number of seconds to allow cURL functions to execute.
355
+
356
+
$sdkConfig = (new SDKConfigBuilder())->setAutoRefreshFields($autoRefreshFields)->setPickListValidation($pickListValidation)->setSSLVerification($enableSSLVerification)->connectionTimeout($connectionTimeout)->timeout($timeout)->build();
353
357
```
354
358
355
359
- Create an instance of RequestProxy containing the proxy properties of the user.
@@ -442,8 +446,11 @@ class Initialize
442
446
443
447
$pickListValidation = false;
444
448
445
-
// Create an instance of SDKConfig
446
-
$sdkConfig = (new SDKConfigBuilder())->setAutoRefreshFields($autoRefreshFields)->setPickListValidation($pickListValidation)->build();
449
+
$connectionTimeout = 2;
450
+
451
+
$timeout = 2;
452
+
453
+
$sdkConfig = (new SDKConfigBuilder())->setAutoRefreshFields($autoRefreshFields)->setPickListValidation($pickListValidation)->setSSLVerification($enableSSLVerification)->connectionTimeout($connectionTimeout)->timeout($timeout)->build();
@@ -489,7 +496,7 @@ All other exceptions such as SDK anomalies and other unexpected behaviours are t
489
496
- **APIResponse<RecordActionHandler>**
490
497
491
498
- For getting Record Count for a specific Tag operation
492
-
499
+
493
500
- **APIResponse<CountHandler>**
494
501
495
502
- For operations involving BaseCurrency
@@ -645,8 +652,11 @@ class MultiThread
645
652
646
653
$pickListValidation = false;
647
654
648
-
// Create an instance of SDKConfig
649
-
$sdkConfig = (new SDKConfigBuilder())->setAutoRefreshFields($autoRefreshFields)->setPickListValidation($pickListValidation)->build();
655
+
$connectionTimeout = 2;
656
+
657
+
$timeout = 2;
658
+
659
+
$sdkConfig = (new SDKConfigBuilder())->setAutoRefreshFields($autoRefreshFields)->setPickListValidation($pickListValidation)->setSSLVerification($enableSSLVerification)->connectionTimeout($connectionTimeout)->timeout($timeout)->build();
$sdkConfig = (new SDKConfigBuilder())->setAutoRefreshFields($autoRefreshFields)->setPickListValidation($pickListValidation)->build();
798
-
806
+
$connectionTimeout = 2;
807
+
808
+
$timeout = 2;
809
+
810
+
$sdkConfig = (new SDKConfigBuilder())->setAutoRefreshFields($autoRefreshFields)->setPickListValidation($pickListValidation)->setSSLVerification($enableSSLVerification)->connectionTimeout($connectionTimeout)->timeout($timeout)->build();
* @param timeout A int maximum number of seconds to allow cURL functions to execute.
80
+
* @return An instance of Builder
81
+
*/
82
+
publicfunctiontimeout(int$timeout)
83
+
{
84
+
$this->timeout = $timeout > 0 ? $timeout : 0;
85
+
86
+
return$this;
87
+
}
88
+
89
+
// CURLOPT_CONNECTTIMEOUT is a segment of the time represented by CURLOPT_TIMEOUT, so the value of the CURLOPT_TIMEOUT should be greater than the value of the CURLOPT_CONNECTTIMEOUT.
0 commit comments