Skip to content

checkdomain/toml

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 

Checkdomain TOML Parser Build Status

Checkdomain TOML Parser is a parser for TOML files.

Installation

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

Composer

Get Composer and add the following to your composer.json:

"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.

Usage

Once installed Checkdomain TOML Parser is easy to use:

<?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:

<?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.

About

PHP TOML Parser

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages