Commit cfcd8d20b1b1cdcb19585d021c29298e16fbf2a7

Authored by Alexey Boroda
1 parent df0fbd94

-Yml update 3

Showing 1 changed file with 18 additions and 0 deletions   Show diff stats
helpers/XmlHelper.php 0 → 100755
  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 19 \ No newline at end of file
... ...