Download the PHP package ibnusyuhada/slim-lite-configuration without Composer

On this page you can find all versions of the php package ibnusyuhada/slim-lite-configuration. 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 slim-lite-configuration

Slim Lite Configuration

Latest Stable Version License Total Downloads Build Status

Slim Lite Configuration is a file(s) configuration loader for Slim Framework Middleware. Just say the file(s), then Slim Lite Configuration will register the configuration items automatically to Slim settings. This package support with Ini, Php, Json, Xml, Yaml format. If need to change the configuration file, this package can do as you want.

Requirements

Slim Lite Configuration requires PHP 5.3+ and works for Slim Framework v3.0.0 or above.

Installation

The easiest way to installing Slim Lite Configuration is via Composer

Usage

Slim Lite Configuration designed to be simple to use in Slim Framework. You only register the file(s) or directory of config file(s), then configuration immediately ready for use. When you need to change the items of configuration in a file, just say the path file. Internally uses hassankhan config.

Loading Files

Slim Lite Configuration able to load one file or multiple files or optional files at same time. Rather than say the file name one by one, you can add the directory of files then configuration ready to use. Initially register Slim Lite Configuration to container

Register Per Route

As middleware, after register Slim Lite Configuration into container, then we can register all items of configuration in specific route.

Register For All Routes

But, if you want all configuration are available for all routes, just do like code below

Write Or Update Configuration File

You are allowed to create a file of configuration if the request file is not exist. But you will get update if file configuration is exist. Here is the example usage in concept Slim Lite Configuration for all routes:

Access All Configuration Items

Let say we have a file config.yaml like below

In design, all items of configuration will be placed in Slim settings and Slim Lite Configuration container. So, when we want to get all items of configuration we can do with two possible ways in a route

or

Access Specific Configuration Item

In fact, when we want to access specific item of configuration, it can be done with two possible ways in a route as well

or

Set Configuration Item

Set new value of an item(s), there are two possible ways in a route, first is by using this way

In this way, Slim Lite Configuration only update the container but not Slim settings. The second way by update file configuration like explained above.

Safe Memory Usage

Like explained above, Slim Lite Configuration will save the items of configuration in Slim settings and container. This will need more usage of computer memory. So to safe the memory, we can to remove Slim Lite Configuration from container by placed the code below

elsewhere after

do this way will not destroy Slim settings.

Benefits

Conceptually, it is reasonable if configuration items are set in settings. It is means configuration should put in Slim settings. In Slim Lite Configuration, all items of configuration are appended in Slim settings. So basically, when you destroy Slim Lite Configuration from container, Slim settings will not change and the configuration is still exist. This is very useful, because we only focus on access of configuration via Slim settings only and of course we can safe memory. There is a condition where specific request URI has different configuration, and at this point Slim Lite Configuration as middleware is able to do this condition.

Testing

Credits

Ibnu Syuhada

License

The MIT License. See the License


All versions of slim-lite-configuration with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.0
hassankhan/config Version ^0.10.0
league/flysystem Version ^1.0
spatie/array-to-xml Version ^2.1
symfony/yaml Version ^3.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 ibnusyuhada/slim-lite-configuration contains the following files

Loading the files please wait ....