Search by

alathazal / starforged-php

Alathazal

A generic PHP wrapper that loads the JSON data files provided by the alathazal/starforged-data package, to provide them as standard PHP array resources.

Package info

github.com/alathazal/starforged-php

pkg:composer/alathazal/starforged-php

Statistics

Installs: 4

Dependents: 0

Suggesters: 0

Stars: 0

1.0.1 2026-09-10 18:41 UTC

This package is auto-updated.

Last update: 2026-11-12 08:12:12 UTC


README

Static Badge Static Badge Static Badge

The starforged-php package is a generic PHP wrapper that loads the JSON data files provided by the alathazal/starforged-data package, to provide them as standard PHP array resources.

Usage

To install the starforged-php package using composer, run the following at the command line in your project folder.

composer require alathazal/starforged-php

You can access the varoius datasets using the getData() method, used in conjuction with the DataTypes enumerator to select which dataset you're looking for.

OR

There is a helper, shortcut method setup for each dataset that can be called by name.

use Alathazal\StarforgedData\DataTypes;
use Alathazal\StarforgedPhp\StarforgedPhp;

$starforged = new StarforgedPhp();

// using a named dataset.
$truths = $starforged->getData(DataTypes::TRUTHS);

// using a named shortcut method.
         $assets = $starforged->assets();
    $asset_types = $starforged->asset_types();
     $encounters = $starforged->encounters();
$move_categories = $starforged->move_categories();
          $moves = $starforged->moves();
        $oracles = $starforged->oracles();
         $truths = $starforged->truths();

Testing

Testing for this package is done through a suite of PEST tests, that checks that the data files are parsed properly and that the endpoints for this repository all return data in arrays as expected. These tests can be found in the tests/ folder of the project and can be run using:

composer test

License

MIT License

Copyright (c) 2026 Alathazal

For specific information regarding this license, please see the LICENSE.md file.