Download the PHP package simoneddy/config without Composer

On this page you can find all versions of the php package simoneddy/config. 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

Config

Basic Config class with file loader.

Changes in 2.0.0

Changes in 1.1

Installation

This library can be installed with composer:

Dependencies

Usage

A Config object can be created by either passing values to the class constructor or by using one of the various factory methods:

Internally, this factory method uses the PathLoader class to scan the provided path and load all supported filetypes into an array. This array is given to the ConfigFactory which constructs the neccessary config class.

Unsupported files will be ignored.

If the path is a directory the PathLoader will attempt to load values from every supported file the directory contains. This also applies to any subdirectories and their contents.

Files are loaded as key-value pairs, using the base filename (minus extension) as the key, while the file contents is the value.

For example:

PLEASE NOTE YAML files will be ignored unless the symfony/yaml package is also installed.

You can also use the Config class constructor and provide your config values directly as the sole argument:

Once the config object is created it can be accessed like an array, with dot notation to specify nested keys:

Internally, array access methods use get($key) and has($key) methods. These methods can also be used directly:

The Eddy\Config\Config object is read only and values cannot be modified after the object is instantiated. For mutability use the Eddy\Confi\MutableConfig class, which adds set and remove methods, as well as properly implementing \ArrayAccess::offsetUnset and \ArrayAccess::offsetSet:

Of course, all setting and unsetting can utilise dot notation for nested values:

By design, the set method (and subsequently offsetSet) will merge nested key => value pairs where neccessary. If you want to completely overwrite the parent key you can use the overwrite method:

The config object contains a toArray method that returns all config values as an array. The returned array maintains config keys and structure.

Seriali(s/z)ing

The Config class implements both PHPs JsonSerializable interfaces and serializing magic methods to PHP 8 standards. No deprecation warnings here!

Supported Filetypes

The ConfigLoader supports the following filetypes:

The given path can also be a directory containing supported files and subdirectories. The directory structure will be used to determine nesting.


All versions of config with dependencies

PHP Build Version
Package Version
Requires php Version >=8.0
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 simoneddy/config contains the following files

Loading the files please wait ....