File tree Expand file tree Collapse file tree 3 files changed +15
-1
lines changed Expand file tree Collapse file tree 3 files changed +15
-1
lines changed Original file line number Diff line number Diff line change 44
44
<argument key =" binder_request_header_class" >%besimple.soap.binder.request_header.rpcliteral.class%</argument >
45
45
<argument key =" binder_request_class" >%besimple.soap.binder.request.rpcliteral.class%</argument >
46
46
<argument key =" binder_response_class" >%besimple.soap.binder.response.rpcliteral.class%</argument >
47
+ <argument key =" wsdl_stylesheet" >%besimple.soap.definition.dumper.options.stylesheet%</argument >
47
48
</argument >
48
49
<argument type =" service" id =" besimple.soap.cache" />
49
50
</service >
58
59
<argument key =" binder_request_header_class" >%besimple.soap.binder.request_header.documentwrapped.class%</argument >
59
60
<argument key =" binder_request_class" >%besimple.soap.binder.request.documentwrapped.class%</argument >
60
61
<argument key =" binder_response_class" >%besimple.soap.binder.response.documentwrapped.class%</argument >
62
+ <argument key =" wsdl_stylesheet" >%besimple.soap.definition.dumper.options.stylesheet%</argument >
61
63
</argument >
62
64
<argument type =" service" id =" besimple.soap.cache" />
63
65
</service >
Original file line number Diff line number Diff line change @@ -78,7 +78,7 @@ public function getWsdlFile($endpoint = null)
78
78
$ definition ->setOption ('location ' , $ endpoint );
79
79
}
80
80
81
- $ dumper = new Dumper ($ definition );
81
+ $ dumper = new Dumper ($ definition, array ( ' stylesheet ' => $ this -> options [ ' wsdl_stylesheet ' ]) );
82
82
$ cache ->write ($ dumper ->dump ());
83
83
}
84
84
Original file line number Diff line number Diff line change @@ -69,6 +69,7 @@ public function setOptions(array $options)
69
69
'version12_class ' => 'BeSimple \\SoapWsdl \\Dumper \\Version12 ' ,
70
70
'version11_name ' => $ this ->definition ->getName (),
71
71
'version12_name ' => $ this ->definition ->getName ().'12 ' ,
72
+ 'stylesheet ' => null ,
72
73
);
73
74
74
75
$ invalid = array ();
@@ -123,6 +124,8 @@ public function dump()
123
124
124
125
$ this ->document ->formatOutput = true ;
125
126
127
+ $ this ->addStylesheet ();
128
+
126
129
return $ this ->document ->saveXML ();
127
130
}
128
131
@@ -297,6 +300,15 @@ protected function addPortOperation(Method $method)
297
300
return $ operation ;
298
301
}
299
302
303
+ protected function addStylesheet ()
304
+ {
305
+ if ($ this ->options ['stylesheet ' ]) {
306
+ $ stylesheet = $ this ->document ->createProcessingInstruction ('xml-stylesheet ' , sprintf ('type="text/xsl" href="%s" ' , $ this ->options ['stylesheet ' ]));
307
+
308
+ $ this ->document ->insertBefore ($ stylesheet , $ this ->document ->documentElement );
309
+ }
310
+ }
311
+
300
312
protected function getVersion ($ version )
301
313
{
302
314
if (\SOAP_1_2 === $ version ) {
You can’t perform that action at this time.
0 commit comments