定制 checkdomain/php-toml 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

checkdomain/php-toml

Composer 安装命令:

composer require checkdomain/php-toml

包简介

A PHP TOML Parser to parse TOML configuration files.

关键字:

README 文档

README

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.

统计信息

  • 总下载量: 10
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 4
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 3
  • Watchers: 3
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: GNU
  • 更新时间: 2013-02-25