PHPackages                             pandaac/exporter - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. pandaac/exporter

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

pandaac/exporter
================

v2.1.2(9y ago)2793MITPHPPHP &gt;=5.6.4

Since May 27Pushed 9y ago1 watchersCompare

[ Source](https://github.com/pandaac/exporter)[ Packagist](https://packagist.org/packages/pandaac/exporter)[ RSS](/packages/pandaac-exporter/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (6)Dependencies (2)Versions (9)Used By (0)

Exporter
========

[](#exporter)

The aim of the pandaac exporter is to provide a simple &amp; quick interface to export data from the common XML files found within the data/ directory of your Open Tibia server.

> *It is strongly recommended that you cache the response rather than parsing it over and over again.*

> *As of right now, this exporter assumes that you're using [The Forgotten Server 1.1](https://github.com/otland/forgottenserver/tree/1.1). I have no immediate plans to expand this to any other distrobutions until I expand the distrobution range for [pandaac](https://github.com/pandaac/pandaac) itself. However, if there's enough public pressure for a specific distrobution, I may reconsider.*

Requirements
------------

[](#requirements)

- PHP 5.6.4+
- PHP Extensions
    - libxml

Install
-------

[](#install)

##### Via Composer

[](#via-composer)

```
composer require pandaac/exporter

```

Usage
-----

[](#usage)

Pass the absolute path to your Open Tibia server as the first argument of the `Exporter` object and specify which parser you would like to use as the first argument of the `parse` method of the `Exporter` object.

The `parse` method also accepts a second argument for additional attributes (depends on the parser), and a third argument for overriding the default filepath (or providing a specific parser with a filepath).

```
use Exception;
use pandaac\Exporter\Parsers;
use pandaac\Exporter\Exporter;

try {
    $exporter = new Exporter('/home/pandaac/theforgottenserver');

    $response = $exporter->parse(new Parsers\Weapons);
} catch (Exception $e) {
    // Handle exceptions as you see fit...
}
```

##### Settings

[](#settings)

Optionally, you may pass through engine specific settings as the second argument of the `\pandaac\Exporter\Exporter` object.

```
$exporter = new Exporter('/home/pandaac/theforgottenserver', $settings);
```

Available settings are as follows *(the selected values are the default values)*:

```
$settings = [
    'xml' => [
        // The XML engine will automatically validate any file it tries to parse,
        // and if the data is invalid, an exception will be thrown. You may
        // disable this behaviour by setting `validate` to `false`.
        'validate' => true,

        // The XML engine will not throw exceptions on missing files when
        // parsing through a recursive structure. You may enable this
        // behaviour by setting `strict` to `true`.
        'strict' => false,
    ],
]
```

Response
--------

[](#response)

Each parser returns an [Illuminate Collection](https://laravel.com/docs/5.4/collections) object. Please refer to the Laravel documentation for details on how to utilise it.

Parsers
-------

[](#parsers)

Parsers are what decides how to parse a certain file, and how to structure its response. It is important you use the correct parser for the correct file.

### XML Parsers

[](#xml-parsers)

- **Actions**

    ```
    $exporter->parse(new \pandaac\Exporter\Parsers\Actions);
    ```
- **Chat Channels**

    ```
    $exporter->parse(new \pandaac\Exporter\Parsers\ChatChannels);
    ```
- **Commands**

    ```
    $exporter->parse(new \pandaac\Exporter\Parsers\Commands);
    ```
- **Creature Scripts**

    ```
    $exporter->parse(new \pandaac\Exporter\Parsers\CreatureScripts);
    ```
- **Events**

    ```
    $exporter->parse(new \pandaac\Exporter\Parsers\Events);
    ```
- **Global Events**

    ```
    $exporter->parse(new \pandaac\Exporter\Parsers\GlobalEvents);
    ```
- **Groups**

    ```
    $exporter->parse(new \pandaac\Exporter\Parsers\Groups);
    ```
- **Items**

    ```
    $exporter->parse(new \pandaac\Exporter\Parsers\Items);
    ```
- **Map Houses**

    > You must specify the relative filename as the third argument.

    ```
    $exporter->parse(new \pandaac\Exporter\Parsers\MapHouses, [], 'forgotten-house.xml');
    ```
- **Map Spawns**

    > You must specify the relative filename as the third argument.

    ```
    $exporter->parse(new \pandaac\Exporter\Parsers\MapSpawns, [], 'forgotten-spawn.xml');
    ```
- **Monster**

    > You must specify the relative filename as the third argument.

    ```
    $exporter->parse(new \pandaac\Exporter\Parsers\Monster, [], 'Demons/Demon.xml');
    ```
- **Monsters**

    > You may also load the data from within each individual monster file by setting the `recursive` attribute to `true`.

    ```
    $exporter->parse(new \pandaac\Exporter\Parsers\Monsters, [ 'recursive' => true ]);
    ```
- **Mounts**

    ```
    $exporter->parse(new \pandaac\Exporter\Parsers\Mounts);
    ```
- **Movements**

    ```
    $exporter->parse(new \pandaac\Exporter\Parsers\Movements);
    ```
- **NPC**

    > You must specify the relative filename as the third argument.

    ```
    $exporter->parse(new \pandaac\Exporter\Parsers\NPC, [], 'The Oracle.xml');
    ```
- **Outfits**

    ```
    $exporter->parse(new \pandaac\Exporter\Parsers\Outfits);
    ```
- **Quests**

    ```
    $exporter->parse(new \pandaac\Exporter\Parsers\Quests);
    ```
- **Raid**

    > You must specify the relative filename as the third argument.

    ```
    $exporter->parse(new \pandaac\Exporter\Parsers\Raid, [], 'testraid.xml');
    ```
- **Raids**

    > You may also load the data from within each individual raid file by setting the `recursive` attribute to `true`.

    ```
    $exporter->parse(new \pandaac\Exporter\Parsers\Raids, [ 'recursive' => true ]);
    ```
- **Spells**

    ```
    $exporter->parse(new \pandaac\Exporter\Parsers\Spells);
    ```
- **Stages**

    ```
    $exporter->parse(new \pandaac\Exporter\Parsers\Stages);
    ```
- **TalkActions**

    ```
    $exporter->parse(new \pandaac\Exporter\Parsers\TalkActions);
    ```
- **Vocations**

    ```
    $exporter->parse(new \pandaac\Exporter\Parsers\Vocations);
    ```
- **Weapons**

    ```
    $exporter->parse(new \pandaac\Exporter\Parsers\Weapons);
    ```
- **XMLSource**
    If you have a string containing XML, you may also parse that using the following setup.

    ```
    use pandaac\Exporter\Parsers\XMLSource;
    use pandaac\Exporter\Sources\StringContent;

    $exporter->parse(new XMLSource(
        new StringContent('')
    ));
    ```

### OTBM Parsers

[](#otbm-parsers)

> The OTBM engine has not yet been developed, and thus the following parsers are rendered obsolete for the time being.

- **Towns**

    ```
    $exporter->parse(new \pandaac\Exporter\Parsers\Towns);
    ```

Contributing
------------

[](#contributing)

Please refer to the [PSR-2 guidelines](http://www.php-fig.org/psr/psr-2/) and squash your commits together into one before submitting a pull request.

Thank you.

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity63

Established project with proven stability

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~54 days

Recently: every ~10 days

Total

8

Last Release

3304d ago

Major Versions

v1.0 → v2.0.02017-02-15

PHP version history (2 changes)v1.0PHP &gt;=5.5.9

v2.0.0PHP &gt;=5.6.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/280eafadc6af3f5226043e5add75ce5b251d98e4f26cac7e667eb3bfdd8726df?d=identicon)[eklundchristopher](/maintainers/eklundchristopher)

---

Tags

exportertibiaopentibiapandaac

### Embed Badge

![Health badge](/badges/pandaac-exporter/health.svg)

```
[![Health](https://phpackages.com/badges/pandaac-exporter/health.svg)](https://phpackages.com/packages/pandaac-exporter)
```

###  Alternatives

[jofrysutanto/windsor

YAML-ised Configuration for ACF

549.2k](/packages/jofrysutanto-windsor)[jshannon63/jsoncollect

Supercharge your JSON using collections

155.0k1](/packages/jshannon63-jsoncollect)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
