Download the PHP package websublime/config without Composer

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

Websublime\Config

Build Status

Syntax

Config component is a package based on Symfony Config where it is used as a catalogue of configurations. It can be inserted or just loading from two types of files: yml and php. We do not have made more supported files because it is this kind of files that we most use.

How To Use

First create an instance of which type of loader for the file you want to use.

$yaml = new YamlConfigLoader('/path/where/config/will/be');

Then create an instance of Config and set the loader resolver.

$config = new Config();
$config->setConfigResolver($yaml);

After, you have to import your configuration file.

$config->import('myconfig.yml');

The import method is void. The configuration is added to ConfigCatalogue were you can interact in Config. Lets say your config fil have:

config:
    key: 'My new option'

When you import your configuration file it is registered in ConfigCatalogue with the name of your file without extension and if it is an array multidimensional it will be transformer in a flatten array. So to get our value from our config we call:

$config->get('myconfig.config.key');

The methods present in ConfigCatalogue are:

ConfigCatalogue->get($key);
ConfigCatalogue->add($value, $key=null);
ConfigCatalogue->remove($key);
ConfigCatalogue->exist($key);
ConfigCatalogue->all();

Of course it isn't mandatory to use a file of configurations. You can use it without one. Just instantiate the Config and you are rock and load to use the ConfigueCatalogue methods.

Changelog

- Added version 0.2
- Added support for loading php files for configs
- Added methods getDelegateLoader() and getLoaderResolver() on ConfigResolver.

All versions of config with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.14
symfony/config Version 2.1.*
symfony/yaml Version 2.1.*
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 websublime/config contains the following files

Loading the files please wait ....