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
+71-32Lines changed: 71 additions & 32 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,8 @@
1
-
**IMPORTANT: This will be one of the last releases for the v1 major (except for security updates). We're working on a new major version (v2.x) with PHP7 support. From v2 onward, it will no longer be backward compatible with the v1.x releases of the wrapper. Also, we will no longer name the releases after our API version (which will remain at v1).**
2
-
3
1
# Xolphin API wrapper for PHP
4
2
xolphin-php-api is a library which allows quick integration of the [Xolphin REST API](https://api.xolphin.com) in PHP to automated ordering, issuance and installation of SSL Certificates.
5
3
6
4
## About Xolphin
7
-
[Xolphin](https://www.xolphin.nl/) is the largest supplier of [SSL Certificates](https://www.sslcertificaten.nl) and [Digital Signatures](https://www.digitalehandtekeningen.nl) in the Netherlands. Xolphin has a professional team providing reliable support and rapid issuance of SSL Certificates at an affordable price from industry leading brands such as Comodo, GeoTrust, GlobalSign, Thawte and Symantec.
5
+
[Xolphin](https://www.xolphin.nl/) is the largest supplier of [SSL Certificates](https://www.sslcertificaten.nl) and [Digital Signatures](https://www.digitalehandtekeningen.nl) in the Netherlands. Xolphin has a professional team providing reliable support and rapid issuance of SSL Certificates at an affordable price from industry leading brands such as Sectigo, GeoTrust, GlobalSign, Thawte and Symantec.
8
6
9
7
## Library installation
10
8
@@ -20,6 +18,28 @@ And updated via
20
18
composer update xolphin/xolphin-api-php
21
19
```
22
20
21
+
### Upgrade guide from v1.8.3 to v2.x
22
+
Update your `xolphin/xolphin-api-php` dependency to `^2.0` in your `composer.json` file.
23
+
24
+
#### Renamed classes
25
+
All endpoint classes have been renamed to a more generic name `<resource>Endpoint`. You should update your usages.
26
+
27
+
#### Calling Endpoint classes
28
+
All endpoint classes are started during startup
29
+
They can be called using `$client->certificates->all()` instead of `$client->certificate()->all()`.
30
+
31
+
#### Using Helpers instead of strings
32
+
In version 2.0.0 we introduced Helper classes. These classes contain constants of all static string variables (enums).
33
+
Use these constants instead of a string, because we will alter these constants whenever we change the corresponding value in the API.
34
+
35
+
For instance, when creating a DCV for a domain:
36
+
```php
37
+
$dcvDomain = new Xolphin\Requests\DCVDomain('someDomain', Xolphin\Helpers\DCVTypes::EMAIL_VALIDATION, '[email protected]');
38
+
```
39
+
40
+
#### Certificate download() method returns string
41
+
The method `download()` on the class `CertificatesEndpoint` now returns the certificate string instead of the `GuzzlestreamInterface`.
42
+
23
43
## Usage
24
44
25
45
### Client initialization
@@ -51,7 +71,7 @@ echo $requestsRemaining . "\n";
51
71
#### Get list of requests
52
72
53
73
```php
54
-
$requests = $client->request()->all();
74
+
$requests = $client->requests->all();
55
75
foreach($requests as $request) {
56
76
echo $request->id . "\n";
57
77
}
@@ -60,17 +80,17 @@ foreach($requests as $request) {
60
80
#### Get request by ID
61
81
62
82
```php
63
-
$request = $client->request()->get(1234);
83
+
$request = $client->requests->get(1234);
64
84
echo $request->id;
65
85
```
66
86
67
87
#### Request certificate
68
88
69
89
```php
70
-
$products = $client->support()->products();
90
+
$products = $client->support->products();
71
91
72
-
// request Comodo EssentialSSL certificate for 1 year
0 commit comments