Conditions | 2 |
Paths | 2 |
Total Lines | 19 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
27 | public function __construct($reference) |
||
28 | { |
||
29 | $elements = [ |
||
30 | new FragmentInjection( |
||
31 | 'http://schemas.xmlsoap.org/soap/envelope/', |
||
32 | 'Header', |
||
33 | '<repr:representedParty xmlns:repr="http://x-road.eu/xsd/representation.xsd"/>' |
||
34 | ), |
||
35 | ]; |
||
36 | |||
37 | foreach ($reference as $name => $value) { |
||
38 | $elements[] = new DOMElementInjection( |
||
39 | 'http://x-road.eu/xsd/representation.xsd', |
||
40 | 'representedParty', |
||
41 | new \DOMElement($name, $value, 'http://x-road.eu/xsd/representation.xsd') |
||
42 | ); |
||
43 | } |
||
44 | |||
45 | parent::__construct(...$elements); |
||
46 | } |
||
48 |