https://github.com/eno-lang/enophp
PHP library for parsing, loading and inspecting eno documents
https://github.com/eno-lang/enophp
eno loaders parser php validator
Last synced: about 2 months ago
JSON representation
PHP library for parsing, loading and inspecting eno documents
- Host: GitHub
- URL: https://github.com/eno-lang/enophp
- Owner: eno-lang
- License: mit
- Created: 2018-07-07T07:42:45.000Z (almost 7 years ago)
- Default Branch: main
- Last Pushed: 2021-08-12T09:36:06.000Z (almost 4 years ago)
- Last Synced: 2025-03-29T03:11:41.844Z (2 months ago)
- Topics: eno, loaders, parser, php, validator
- Language: PHP
- Homepage:
- Size: 251 KB
- Stars: 6
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# enophp
PHP library for parsing, loading and inspecting eno documents
## Installation
composer require eno-lang/enophp
## Getting started
Create an eno document, for instance `intro.eno`:
```eno
Greeting: Hello World!
```A minimal example to read this file with `enophp`:
```php
use Eno\Parser;$input = file_get_contents('intro.eno');
$document = Parser::parse($input);
echo( $document->field('Greeting') ); // prints 'Hello World!'
```## Complete documentation and API reference
See [archived.eno-lang.org/php/](https://archived.eno-lang.org/php/)
## Running the tests
Install [kahlan](https://github.com/kahlan/kahlan) as development dependency:
```bash
composer install
```Run the tests:
```bash
./vendor/bin/kahlan
```Note that the test suite has a high peak memory load at some point, which might,
depending on your system configuration, exceed your PHP maximum memory
threshold. If you run into this you can for instance increase the limit in your
`php.ini` and specify e.g. `memory_limit = 512M`.