| Conditions | 2 |
| Paths | 2 |
| Total Lines | 22 |
| Code Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 23 | public function __construct($reference) |
||
| 24 | { |
||
| 25 | $elements = [ |
||
| 26 | new FragmentInjection( |
||
| 27 | 'http://schemas.xmlsoap.org/soap/envelope/', |
||
| 28 | 'Header', |
||
| 29 | '<xrd:service xmlns:xrd="http://x-road.eu/xsd/xroad.xsd" ' . |
||
| 30 | 'xmlns:id="http://x-road.eu/xsd/identifiers" ' . |
||
| 31 | 'id:objectType="SERVICE"/>' |
||
| 32 | ), |
||
| 33 | ]; |
||
| 34 | |||
| 35 | |||
| 36 | foreach ($reference as $name => $value) { |
||
| 37 | $elements[] = new DOMElementInjection( |
||
| 38 | 'http://x-road.eu/xsd/xroad.xsd', |
||
| 39 | 'service', |
||
| 40 | new \DOMElement($name, $value, 'http://x-road.eu/xsd/identifiers') |
||
| 41 | ); |
||
| 42 | } |
||
| 43 | |||
| 44 | parent::__construct(...$elements); |
||
| 45 | } |
||
| 47 |