Commit cfcd8d20b1b1cdcb19585d021c29298e16fbf2a7
1 parent
df0fbd94
-Yml update 3
Showing
1 changed file
with
18 additions
and
0 deletions
Show diff stats
1 | +<?php | ||
2 | + | ||
3 | + namespace artweb\artbox\ecommerce\helpers; | ||
4 | + | ||
5 | + use yii\base\Object; | ||
6 | + | ||
7 | + class XmlHelper extends Object | ||
8 | + { | ||
9 | + public static function createElement(string $name, string $value = '', array $attributes = []) | ||
10 | + { | ||
11 | + $element = '<' . $name; | ||
12 | + foreach ($attributes as $key => $attribute) { | ||
13 | + $element .= ' ' . $key . '="' . $attribute . '"'; | ||
14 | + } | ||
15 | + $element .= '>' . $value . '</' . $name . '>'; | ||
16 | + return $element; | ||
17 | + } | ||
18 | + } | ||
0 | \ No newline at end of file | 19 | \ No newline at end of file |