Skip to content

Commit ffc5cd5

Browse files
Merge pull request #10 from roelvanduijnhoven/patch-2
Make VIES client timeout configurable via constructor parameter. Thanks @roelvanduijnhoven!
2 parents 2e1af5e + 1e0032b commit ffc5cd5

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/Vies/Client.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,11 @@ class Client {
1919

2020
/**
2121
* Client constructor.
22+
*
23+
* @param int $timeout How long should we wait before aborting the request to VIES?
2224
*/
23-
public function __construct() {
24-
$this->client = new SoapClient( self::URL, [ 'connection_timeout' => 10 ]);
25+
public function __construct($timeout = 10) {
26+
$this->client = new SoapClient( self::URL, [ 'connection_timeout' => $timeout ]);
2527
}
2628

2729
/**

0 commit comments

Comments
 (0)