PHPackages                             getsky/phalcon-config-loader - 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. [Framework](/categories/framework)
4. /
5. getsky/phalcon-config-loader

ActiveLibrary[Framework](/categories/framework)

getsky/phalcon-config-loader
============================

Component to load configuration from various files

v1.1.3(11y ago)344912MITPHPPHP &gt;=5.4

Since May 7Pushed 11y ago1 watchersCompare

[ Source](https://github.com/JimmDiGrizli/phalcon-config-loader)[ Packagist](https://packagist.org/packages/getsky/phalcon-config-loader)[ RSS](/packages/getsky-phalcon-config-loader/feed)WikiDiscussions develop Synced 4d ago

READMEChangelog (7)Dependencies (4)Versions (9)Used By (2)

ConfigLoader [![Build Status](https://camo.githubusercontent.com/63fb841c812b0f55b325a528e989b7db80838304bdf3b6a4ee9d96d235594cdb/68747470733a2f2f7472617669732d63692e6f72672f4a696d6d44694772697a6c692f7068616c636f6e2d636f6e6669672d6c6f616465722e706e673f6272616e63683d646576656c6f70)](https://travis-ci.org/JimmDiGrizli/phalcon-config-loader) [![Dependency Status](https://camo.githubusercontent.com/6148904cbe974f4d628f7522be632809ab2b18873802bf9ee0645b82bc2c2c71/68747470733a2f2f7777772e76657273696f6e6579652e636f6d2f757365722f70726f6a656374732f3533376338356665313463313538306138363030303130332f62616467652e737667)](https://www.versioneye.com/user/projects/537c85fe14c1580a86000103)
==========================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================

[](#configloader--)

ConfigLoader - it's manager configuration files for Phalcon. It allows you to create a configuration of various formats (ini, yaml, JSON, PHP arrays or any other, for which you will add adapter) via a single method.

```
$configYml = $configLoader->create('config.yml');
$configIni = $configLoader->create('config.ini');
$configPhp = $configLoader->create('config.php');

// or use string
$string = 'foo = bar'
$configFromText = $configLoader->fromText($string, 'ini');

// or use arrays
$config = ['foo' => 'bar'];
$configFromArray = $configLoader->fromArray($config);
```

ConfigLoader is able to track `%environment%` in configuration files and replace it on our environment.

```
// Create ConfigLoader and specify the environment of our application
$configLoader = new ConfigLoader('prod');

// config.yml : test: %environment%
$configYml = $configLoader->create('config.yml');

echo $configYml->test;
// print: prod
```

To add your adapter, you must call `add ()` with transfer expansion and adapter class, which must inherit a class `Phalcon\Config`:

```
$config = $configLoader->add('xml', 'MyNamespace/XmlConfig');
```

Moreover, you can merge configuration files:

```
#config.ini
[test]
test = true
%res% = import.ini
exp = %res:import.ini
%class% = Test/Class::SERVICES
import-class =  %class:Test/Class::SERVICES
```

```
#import.ini
import = "test"
```

```
namespace Test;

class Class {
  const SERVICES = '/const.ini';
}
```

```
#const.ini
class = "class"
```

The result loading configuration from `config.ini`:

```
[
    'test' => [
        'test' => true,
        'import' => true,
        'env' => 'dev',
        'exp' => [
            'import' => true,
            'env' => 'dev'
        ],
        'class' => "class",
        'impot-class' => [
            'class' => "class"
        ]
    ]
]
```

Declared variables in the parent file will not be replaced by variables from the child (only %res% or %class%):

```
# /app/config/config.ini
%res% = include.ini
[foo]
test = config-test
```

```
# /app/config/include.ini
[foo]
test = test
bar = bar
```

```
# result
[foo]
test = config-test
bar = bar
```

If you do not want to import resources (loading of the other configuration files in this configuration), the second parameter must pass a boolean `false `:

```
$config = $configLoader->create('config.ini', false);
```

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity63

Established project with proven stability

 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.

###  Release Activity

Cadence

Every ~29 days

Recently: every ~7 days

Total

7

Last Release

4214d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/6f3317bf3a7622b52216bc897cf6875f60a51c5c95bce653ce0f9dec77ef92d7?d=identicon)[JimmDiGrizli](/maintainers/JimmDiGrizli)

---

Top Contributors

[![chillicake-gh](https://avatars.githubusercontent.com/u/231920384?v=4)](https://github.com/chillicake-gh "chillicake-gh (1 commits)")

---

Tags

frameworkconfigphalcon

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/getsky-phalcon-config-loader/health.svg)

```
[![Health](https://phpackages.com/badges/getsky-phalcon-config-loader/health.svg)](https://phpackages.com/packages/getsky-phalcon-config-loader)
```

###  Alternatives

[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[phalcon/devtools

This tools provide you useful scripts to generate code helping to develop faster and easy applications that use with Phalcon framework.

1.3k2.0M54](/packages/phalcon-devtools)[phalcon/incubator

Adapters, prototypes or functionality that can be potentially incorporated to the C-framework.

7222.9M81](/packages/phalcon-incubator)[phalcon/incubator-mailer

Phalcon Incubator Mailer Adapters

1318.1k2](/packages/phalcon-incubator-mailer)

PHPackages © 2026

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