-
Notifications
You must be signed in to change notification settings - Fork 3
Example: Outfit list (outfits.xml)
Chris edited this page Feb 15, 2017
·
2 revisions
DEPRECATED!
This wiki page has been deprecated and refers to version
1.0of the project. Please refer to the mainREADMEfor the latest documentation.
The parser implementation (pandaac\Exporter\Parsers\Outfits in this case) has no options.
use pandaac\Exporter\Exporter;
use pandaac\Exporter\Parsers\Outfits;
try {
$outfits = new Exporter(
'./data/XML/outfits.xml',
new Outfits
);
$response = $outfits->export();
} catch (Exception $e) {
// Log errors...
}The export() method returns a Illuminate\Support\Collection object, please refer to its documentation. If you would prefer a JSON or an array response however, you may do as follows...
$response = $outfits->export()->toJson();$response = $outfits->export()->toArray();[
{
"type": 0,
"looktype": 136,
"name": "Citizen",
"premium": "no",
"unlocked": "yes",
"enabled": "yes"
},
{
"type": 0,
"looktype": 137,
"name": "Hunter",
"premium": "no",
"unlocked": "yes",
"enabled": "yes"
},
{
"type": 0,
"looktype": 138,
"name": "Mage",
"premium": "no",
"unlocked": "yes",
"enabled": "yes"
},
{
"type": 0,
"looktype": 139,
"name": "Knight",
"premium": "no",
"unlocked": "yes",
"enabled": "yes"
},
{
"type": 0,
"looktype": 140,
"name": "Noblewoman",
"premium": "yes",
"unlocked": "yes",
"enabled": "yes"
},
{
"type": 0,
"looktype": 141,
"name": "Summoner",
"premium": "yes",
"unlocked": "yes",
"enabled": "yes"
},
{
"type": 0,
"looktype": 142,
"name": "Warrior",
"premium": "yes",
"unlocked": "yes",
"enabled": "yes"
},
{
"type": 0,
"looktype": 147,
"name": "Barbarian",
"premium": "yes",
"unlocked": "yes",
"enabled": "yes"
},
{
"type": 0,
"looktype": 148,
"name": "Druid",
"premium": "yes",
"unlocked": "yes",
"enabled": "yes"
},
{
"type": 0,
"looktype": 149,
"name": "Wizard",
"premium": "yes",
"unlocked": "yes",
"enabled": "yes"
},
{
"type": 0,
"looktype": 150,
"name": "Oriental",
"premium": "yes",
"unlocked": "yes",
"enabled": "yes"
},
{
"type": 0,
"looktype": 155,
"name": "Pirate",
"premium": "yes",
"unlocked": "no",
"enabled": "yes"
},
{
"type": 0,
"looktype": 156,
"name": "Assassin",
"premium": "yes",
"unlocked": "no",
"enabled": "yes"
},
{
"type": 0,
"looktype": 157,
"name": "Beggar",
"premium": "yes",
"unlocked": "no",
"enabled": "yes"
},
...
]