I have installed via composer the Array2XML package (composer require openlss/lib-array2xml). The package has installed correctly, but my question is how do I now use this in my module (observer)?
I have tried:
<?php
use Openlss\Array2XML;
use Openlss\LSS\Array2XML;
use Openlss\Array2XML\Array2XML;
use Openlss\lib-array2xml\LSS\Array2XML; // this fails due to the hyphen
?>
(and just about every other combination I can think of!)
Each one of these fails with a class not found error.
This is how the package has installed:
This is the composer file that was generated:
{
"name": "openlss/lib-array2xml"
,"homepage": "http://openlss.org"
,"description": "Array2XML conversion library credit to lalit.org"
,"license": "Apache-2.0"
,"type": "library"
,"keywords": [
"array"
,"xml"
,"xml conversion"
,"array conversion"
]
,"authors": [
{
"name": "Bryan Tong"
,"email": "[email protected]"
,"homepage": "http://bryantong.com"
}
,{
"name": "Tony Butler"
,"email": "[email protected]"
,"homepage": "http://openlss.org"
}
]
,"require": {
"php": ">=5.3.2"
}
,"autoload": {
"psr-0": {
"LSS": ""
}
}
}
I have tried clearing cache, setup:upgrade, deleting var/generation etc but nothing has worked. Using Magento 2.1.6
Any ideas? Thanks.