2017 © Pedro Peláez
 

library php-toml

A PHP TOML Parser to parse TOML configuration files.

image

checkdomain/php-toml

A PHP TOML Parser to parse TOML configuration files.

  • Tuesday, August 25, 2015
  • by checkdomain
  • Repository
  • 2 Watchers
  • 2 Stars
  • 3 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Checkdomain TOML Parser Build Status

Checkdomain TOML Parser is a parser for TOML files., (*1)

Installation

PHP TOML Parser is available via Composer or direct download from github.com. You can find some package infos at packagist.org., (*2)

Composer

Get Composer and add the following to your composer.json:, (*3)

"require": {
    // ...
    "checkdomain/php-toml": "*"
}

Download

If you want to download this (I strongly suggest to use composer) you need to include the files directly or use any sort of PSR-0 compatible autoloading mechanism., (*4)

Usage

Once installed Checkdomain TOML Parser is easy to use:, (*5)

<?php

$toml = new \Checkdomain\Toml('/path/to/toml/file.toml');

// Path accessor
$toml->get('database.server');

// Array accessor
$toml->values['database']['server']

You can also use the instance multiple times by calling the parse method:, (*6)

<?php

$toml = new \Checkdomain\Toml;
$result = $toml->parse('/path/to/toml/file.toml');

// You can access the returned array like this
$result['database']['server'];  

Contributions

You are free to contribute to this project. Please provide test if neccessary for your changes. All tests can be found in the /tests directory., (*7)

The Versions

25/08 2015

dev-master

9999999-dev https://github.com/checkdomain/toml

A PHP TOML Parser to parse TOML configuration files.

  Sources   Download

GNU Public License

The Requires

  • php >=5.3.0

 

parser toml