Commit 945802776e6820e3ba841e6690568e06e9f89954
1 parent
05f3b603
-Yaml controller for low requests ready
Showing
1 changed file
with
16 additions
and
0 deletions
Show diff stats
helpers/XmlHelper.php
... | ... | @@ -15,4 +15,20 @@ |
15 | 15 | $element .= '>' . $value . '</' . $name . '>'; |
16 | 16 | return $element; |
17 | 17 | } |
18 | + | |
19 | + public static function createOpeningElement(string $name, array $attributes = []) | |
20 | + { | |
21 | + $element = '<' . $name; | |
22 | + foreach ($attributes as $key => $attribute) { | |
23 | + $element .= ' ' . $key . '="' . $attribute . '"'; | |
24 | + } | |
25 | + $element .= '>'; | |
26 | + return $element; | |
27 | + } | |
28 | + | |
29 | + public static function createClosingElement(string $name) | |
30 | + { | |
31 | + $element = '</' . $name . '>'; | |
32 | + return $element; | |
33 | + } | |
18 | 34 | } |
19 | 35 | \ No newline at end of file | ... | ... |