PHPackages                             compolomus/iniobject - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. compolomus/iniobject

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

compolomus/iniobject
====================

Ini object

10PHPCI failing

Since Apr 4Pushed 6y ago1 watchersCompare

[ Source](https://github.com/Compolomus/IniObject)[ Packagist](https://packagist.org/packages/compolomus/iniobject)[ RSS](/packages/compolomus-iniobject/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependenciesVersions (2)Used By (0)

Compolomus IniObject
====================

[](#compolomus-iniobject)

[![License](https://camo.githubusercontent.com/aee4f343341c05e2e4cf80c5e290a16b795c1a0a492dedbbd3de02be8ee63f94/68747470733a2f2f706f7365722e707567782e6f72672f636f6d706f6c6f6d75732f496e694f626a6563742f6c6963656e7365)](https://packagist.org/packages/compolomus/IniObject)

[![Build Status](https://camo.githubusercontent.com/f15a1121714309757eb909833e8a589f700ee7273f35ed9105c7df7b667a4423/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f436f6d706f6c6f6d75732f496e694f626a6563742f6261646765732f6275696c642e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/Compolomus/IniObject/build-status/master)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/3b02f05df6f9dfd3fb4b2340d8f5d9a6a773c478eca2469baff187102adb5c39/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f436f6d706f6c6f6d75732f496e694f626a6563742f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/Compolomus/IniObject/?branch=master)[![Code Coverage](https://camo.githubusercontent.com/1e62542f54a7d6a51175520ec81db65d6fa438ede4ae7dc6fd181d2d0a8ebd0d/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f436f6d706f6c6f6d75732f496e694f626a6563742f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/Compolomus/IniObject/?branch=master)[![Code Climate](https://camo.githubusercontent.com/f28dd20ddf8a54b6f22aea6d574a53d3eabb45fd45fe172bf4e1cb08a4c04560/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f436f6d706f6c6f6d75732f496e694f626a6563742f6261646765732f6770612e737667)](https://codeclimate.com/github/Compolomus/IniObject)[![Downloads](https://camo.githubusercontent.com/e3b842b787b3e064af042aa94afe13859e9af006d6144d42b38e0b18c42abaf1/68747470733a2f2f706f7365722e707567782e6f72672f636f6d706f6c6f6d75732f496e694f626a6563742f646f776e6c6f616473)](https://packagist.org/packages/compolomus/IniObject)

Install:
========

[](#install)

composer require compolomus/IniObject

Usage:
======

[](#usage)

```
use Compolomus\IniObject\IniObject;

require __DIR__ . '/vendor/autoload.php';

$json = '{"test":{"param1":1,"param2":2},"test2":{"param3":3,"param4":4}}';

$array = json_decode($json, true); // convert to array

$object = new IniObject(
    /*
     If file exists, a load file, else set name to file save
    */
    'test.ini', // null default
    /*
     Array params to preload values
    */
    $array,
    /*
     Config params or default config (override protected property)
    */
    [
        'strict'    => false,
        'overwrite' => true,
    ]
);

/*

[test]

param1 = 1
param2 = 2

[test2]

param3 = 3
param4 = 4
*/
echo $object; // ini file data

/*
 Get section params
*/

$params = $object->getSection('test')->toArray();

echo '' . print_r($params, true) . '';
/*
 Array
(
    [param1] => 1
    [param2] => 2
)
*/

/*
 Get param by name
*/

$param = $object->getSection('test')->getParam('param1'); // 1
```

**More features see in tests**

###  Health Score

17

—

LowBetter than 6% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity2

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity36

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/c64343f1ab70bc117e5674a8eac95f4329407548510ff57788473ac751e9e230?d=identicon)[Compolomus](/maintainers/Compolomus)

---

Top Contributors

[![Compolomus](https://avatars.githubusercontent.com/u/10777258?v=4)](https://github.com/Compolomus "Compolomus (22 commits)")

### Embed Badge

![Health badge](/badges/compolomus-iniobject/health.svg)

```
[![Health](https://phpackages.com/badges/compolomus-iniobject/health.svg)](https://phpackages.com/packages/compolomus-iniobject)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
