| Total Complexity | 2 |
| Total Lines | 35 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 7 | class PhpToXml |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * @var \XmlWriter $xmlWriter Instance of XmlWriter used |
||
| 11 | * to create the xml document |
||
| 12 | */ |
||
| 13 | protected $xmlWriter; |
||
| 14 | |||
| 15 | /** |
||
| 16 | * Constructor |
||
| 17 | * |
||
| 18 | * Initialize XmlWriter instance |
||
| 19 | */ |
||
| 20 | public function __construct() |
||
| 25 | } |
||
| 26 | |||
| 27 | /** |
||
| 28 | * Convert a php data to xml format |
||
| 29 | * |
||
| 30 | * @param mixed $datas Data to convert |
||
| 31 | * @param string $encoding (Default "UTF-8") Encoding to use for xml |
||
| 32 | * |
||
| 33 | * @return string Xml document |
||
| 34 | */ |
||
| 35 | public function convert($datas, $encoding='UTF-8') |
||
| 44 |