allmarkedup / dayglo
A PHP data loader.
Installs: 145
Dependents: 1
Suggesters: 0
Security: 0
Stars: 5
Watchers: 0
Forks: 0
Open Issues: 0
pkg:composer/allmarkedup/dayglo
Requires
- jamesmoss/toml: ~1.1
- league/csv: ~7.0
- mustangostang/spyc: 0.5.*
Requires (Dev)
- mockery/mockery: ~0.9
- phpunit/phpunit: ~4.3
This package is not auto-updated.
Last update: 2025-10-07 08:52:35 UTC
README
A data file loader/parser for PHP 5.4+.
Installation and use
Using composer:
$ composer require allmarkedup/dayglo
Example
<?php use Amu\Dayglo\Parser; use Amu\Dayglo\Loader; use Amu\Dayglo\ParserCollection; // Create collection with the parsers required $parsers = new ParserCollection([ new Parser\JsonParser(), new Parser\YamlParser() ]); $loader = new Loader($parsers, __DIR__ . '/data'); // load and parse data from a JSON file $file = $loader->fetch('example.json'); $data = $file->getData(); // load and parse data from a YAML file $file = $loader->fetch('test.yaml'); $data = $file->getData();