Total Complexity | 4 |
Total Lines | 53 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
8 | class NovaParameterWriter |
||
9 | { |
||
10 | /** |
||
11 | * Dom document |
||
12 | * |
||
13 | * @var DOMDocument |
||
14 | */ |
||
15 | private $document; |
||
16 | |||
17 | /** |
||
18 | * Parent element |
||
19 | * |
||
20 | * @var DOMElement |
||
21 | */ |
||
22 | private $parent; |
||
23 | |||
24 | /** |
||
25 | * Parameter prefix |
||
26 | * |
||
27 | * @var string |
||
28 | */ |
||
29 | private $parameterPrefix; |
||
30 | |||
31 | /** |
||
32 | * NovaParameterWriter constructor. |
||
33 | * |
||
34 | * @param DOMDocument $document DOM Document |
||
35 | * @param DOMElement $parent Parent element |
||
36 | * @param string $namespace Parameter namespace |
||
37 | */ |
||
38 | 3 | public function __construct(DOMDocument $document, DOMElement $parent, string $namespace = 'novagp:') |
|
39 | { |
||
40 | 3 | $this->document = $document; |
|
41 | 3 | $this->parent = $parent; |
|
42 | 3 | $this->parameterPrefix = $namespace; |
|
43 | 3 | } |
|
44 | |||
45 | /** |
||
46 | * Appends the given parameters to the document inside the parent element. |
||
47 | * |
||
48 | * @param NovaParameterMap $parameterMap Parameter map |
||
49 | * @return void |
||
50 | */ |
||
51 | 3 | public function appendToDocument(NovaParameterMap $parameterMap) |
|
61 | } |
||
62 | 3 | } |
|
64 |