承接 pixel418/iniliq 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

pixel418/iniliq

Composer 安装命令:

composer require pixel418/iniliq

包简介

An ini parser for inherited values through multiple configuration files

关键字:

README 文档

README

An ini parser for inherited values through multiple configuration files

  1. Let's code
    1.1 Json Values
    1.2 Deep selectors
    1.3 File inheritance
    1.4 Appending
    1.5 Reducing
  2. How to Install
  3. How to Contribute
  4. Author & Community

Let's code

Json values

; json-values.ini
[Readme]
example = { json: yeah, is-it: [ good, great, awesome ] }
$ini = ( new \Pixel418\Iniliq\IniParser )->parse( 'json-values.ini' );
// [ 'Readme' => [ 'example' => [ 'json' => 'yeah', 'is-it' => [ 'good', 'great', 'awesome' ] ] ] ]

↑ top

Deep selectors

; deep-selectors.ini
[Readme]
example.selectors.deep = nice
$ini = ( new \Pixel418\Iniliq\IniParser )->parse( 'deep-selectors.ini' );
// [ 'Readme' => [ 'example' => [ 'selectors' => [ 'deep' => 'nice' ] ] ]
get_class( $ini );
// Pixel418\Iniliq\ArrayObject
$ini[ 'Readme.example.selectors.deep' ]
// nice
$ini[ 'Readme.example.selectors.deep' ] = 'amusing'
// [ 'Readme' => [ 'example' => [ 'selectors' => [ 'deep' => 'amusing' ] ] ]

↑ top

File inheritance

; base.ini
[Readme]
example[name] = John Doe
example[id] = 3
; file-inheritance.ini
[Readme]
example.name = file-inheritance
$ini = ( new \Pixel418\Iniliq\IniParser )->parse( [ 'base.ini', 'file-inheritance.ini' ] );
// [ 'Readme' => [ 'example' => [ 'name' => 'file-inheritance', 'id' => '3' ] ] ]

↑ top

Appending

; list.ini
[Readme]
musketeers.name[ ] = Athos
musketeers.name[ ] = Porthos
musketeers.name[ ] = "D'Artagnan"
; adding-values.ini
[Readme]
musketeers.name += [ Aramis ]
$ini = ( new \Pixel418\Iniliq\IniParser )->parse( [ 'list.ini', 'adding-values.ini' ] );
// [ 'Readme' => [ 'musketeers' => [ 'Athos', 'Porthos', 'D\'Artagnan', 'Aramis' ] ] ]

↑ top

Reducing

; list.ini
[Readme]
musketeers.name[ ] = Athos
musketeers.name[ ] = Porthos
musketeers.name[ ] = "D'Artagnan"
; removing-values.ini
[Readme]
musketeers.name -= "[ D'Artagnan ]"
$ini = ( new \Pixel418\Iniliq\IniParser )->parse( [ 'list.ini', 'removing-values.ini' ] );
// [ 'Readme' => [ 'musketeers' => [ 'Athos', 'Porthos' ] ] ]

↑ top

How to Install

If you don't have composer, you have to install it.

Add or complete the composer.json file at the root of your project, like this :

{
    "require": {
        "pixel418/iniliq": "0.3.2"
    }
}

Iniliq can now be downloaded via composer.

Lastly, to use it in your PHP, you can load the composer autoloader :

require_once( './vendor/autoload.php' );

↑ top

How to Contribute

  1. Fork the Iniliq repository
  2. Create a new branch for each feature or improvement
  3. Send a pull request from each feature branch to the develop branch

If you don't know much about pull request, you can read the Github article.

All pull requests must follow the PSR1 standard and be accompanied by passing phpunit tests.

↑ top

Author & Community

Iniliq is under the MIT License.
It is created and maintained by Thomas ZILLIOX.

↑ top

统计信息

  • 总下载量: 25.77k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 6
  • 点击次数: 1
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 6
  • Watchers: 0
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2013-01-15

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固