Download the PHP package yosymfony/config-loader without Composer

On this page you can find all versions of the php package yosymfony/config-loader. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package config-loader

Config loader for PHP

An agnostics configuration loader with built-in loaders for YAML, TOML and JSON.

Build Status Latest Stable Version Scrutinizer Code Quality

Installation

Requires PHP >= 7.2.

Use Composer to install this package:

Usage

Initialization

The class ConfigLoader let you load your configuration resources. It expects a list of loaders in the constructor so you can pass to it only those ones you need:

Available loaders

Yaml loader

Requires: Symfony YAML component:

Initialization:

Toml loader

Requires: Toml component:

Initialization:

Json loader

Initialization:

Loading configuration files:

.dist files

This library has support for .dist files. The filename is resolved following the next hierarchy:

  1. filename.ext
  2. filename.ext.dist (if filename.ext does not exist)

Loading inline configuration:

To parse inline configurations you just need to set the configuration text as first argument instead of the filename and set the format type as second one:

Importing files

This library has support for importing files. The example below shows a YAML file importing three files:

Similar example using JSON syntax:

An example using TOML syntax:

Repository

A configuration file is loaded into a repository. A repository is a wrapper that implements the ArrayAccess interface and exposes methods for working with configuration values.

Operations

Unions

You can performs the union of a repository A with another B into C as result:

The values of $repositoryB have less priority than values in $repositoryA.

Intersections

You can performs the intersection of a repository A with another B into C as result:

The values of $repositoryB have less priority than values in $repositoryA.

Creating a blank repository

Creating a blank repository is too easy. You just need to create a instance of a Repository class:

Unit tests

You can run the unit tests with the following command:

License

This library is open-sourced software licensed under the MIT license.


All versions of config-loader with dependencies

PHP Build Version
Package Version
Requires php Version >=7.2
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package yosymfony/config-loader contains the following files

Loading the files please wait ....