File tree Expand file tree Collapse file tree 2 files changed +19
-4
lines changed
src/Artisaninweb/SoapWrapper Expand file tree Collapse file tree 2 files changed +19
-4
lines changed Original file line number Diff line number Diff line change @@ -48,6 +48,14 @@ class Service {
4848 */
4949 protected $ options ;
5050
51+ /**
52+ * The constructor
53+ */
54+ public function __construct ()
55+ {
56+ $ this ->options = [];
57+ }
58+
5159 /**
5260 * Set the name of the service
5361 *
Original file line number Diff line number Diff line change 33namespace Artisaninweb \SoapWrapper ;
44
55use Exception ;
6+ use Closure ;
67
78/**
89 * Soap Webservice wrapper
1213 */
1314Class Wrapper {
1415
16+ /**
17+ * @var array
18+ */
19+ protected $ clients ;
20+
1521 /**
1622 * @var array
1723 */
2228 */
2329 public function __construct ()
2430 {
25- $ this ->clients = [];
31+ $ this ->clients = [];
32+ $ this ->services = [];
2633 }
2734
2835 /**
@@ -43,7 +50,7 @@ public function services()
4350 * @return mixed
4451 * @throws \Exception
4552 */
46- public function service ($ name ,$ callback )
53+ public function service ($ name , Closure $ callback )
4754 {
4855 if (!empty ($ this ->services [$ name ]))
4956 {
@@ -61,7 +68,7 @@ public function service($name,$callback)
6168 * @return $this
6269 * @throws \Exception
6370 */
64- public function add ($ service )
71+ public function add (Closure $ service )
6572 {
6673 $ client = new Service ();
6774
@@ -85,7 +92,7 @@ public function add($service)
8592 * @param $service
8693 * @return $this
8794 */
88- public function override ($ service )
95+ public function override (Closure $ service )
8996 {
9097 $ client = new Service ();
9198
You can’t perform that action at this time.
0 commit comments