File tree Expand file tree Collapse file tree 1 file changed +33
-1
lines changed
src/Artisaninweb/SoapWrapper Expand file tree Collapse file tree 1 file changed +33
-1
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,11 @@ class Service {
23
23
*/
24
24
protected $ wsdl ;
25
25
26
+ /**
27
+ * @var boolean
28
+ */
29
+ protected $ trace ;
30
+
26
31
/**
27
32
* @var resource
28
33
*/
@@ -56,6 +61,29 @@ public function getName()
56
61
return $ this ->name ;
57
62
}
58
63
64
+ /**
65
+ * Set trace option - enables tracing of request
66
+ *
67
+ * @param $trace
68
+ * @return $this
69
+ */
70
+ public function trace ($ trace )
71
+ {
72
+ $ this ->trace = $ trace ;
73
+
74
+ return $ this ;
75
+ }
76
+
77
+ /**
78
+ * Get the trace option
79
+ *
80
+ * @return boolean
81
+ */
82
+ public function getTrace ()
83
+ {
84
+ return $ this ->trace ;
85
+ }
86
+
59
87
/**
60
88
* Set the wsdl of the service
61
89
*
@@ -241,7 +269,11 @@ public function setSoapHeaders()
241
269
*/
242
270
protected function createClient ()
243
271
{
244
- $ this ->client = new SoapClient ($ this ->getWsdl ());
272
+ $ options = [
273
+ 'trace ' => $ this ->getTrace ()
274
+ ];
275
+
276
+ $ this ->client = new SoapClient ($ this ->getWsdl (), $ options );
245
277
246
278
return $ this ;
247
279
}
You can’t perform that action at this time.
0 commit comments