Download the PHP package samsonos/php_config without Composer

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

SamsonPHP Configuration system

OOP based configuration system. This approach uses all abilities of PHP OOP for creating configurations based on classes.

Latest Stable Version Build Status Code Coverage Code Climate Total Downloads Scrutinizer Code Quality Stories in Ready

Configuration scheme

Your project can have any amount of possible configurations, which is usually used for different environments, such as development, test, deploy, production stages, for this purposes we have created , each of them corresponds to specific environment. In practice you should have base configuration folder, by default it is located at folder.

Global configuration

In root of your folder you should create your default entity configuration classes. If no current configuration environment would be specified, this entity configuration classes would be used automatically.

IMPORTANT! If you have specified some configuration environment(for example ) but you do not have entity configuration class for some module/object in it - Global configuration entity will be used for it instead if present.

Creating configuration environment

To create new configuration environment you should create new folder in your base configuration folder(by default it located at ), for example we want to create environment, new folder path would be: . And all entity configuration classes there would correspond to your configuration scheme, which will be created automatically.

Entity configuration

To configure your project modules\objects - you should use classes, for correct finding this classes among others, we force you to extend our base entity configuration class :

Your entity configuration class name should meet next logic: :

Your entity configuration class namespace should meet next logic:

IMPORTANT! As we use PSR-* standard - Class name must match file name

Possible configuration parameters

The main beauty of OOP configuration approach is that you can specify any possible by PHP values as predefined class field values, the main limitation is that they have to be accessible:

Prohibited operations

Unfortunately you cannot predefine calculations and string concatenations(and perform other operations) in class field values, but you can always perform it in method. When configuration scheme is created, for every environment all entity configuration instances are being created - so their method is performed, where you can make any possible operation.

Extending existing configurations

Also extending parent entity configuration is available, if want to add just some little changes to some entity configuration we can just extend it:

Configuration manager

All project modules/objects configuration is processed via configuration manager , you must create instance of it, you must specify only one parameter , for initialization of manager you should use method, this methods are specially separated to give ability to load entity configuration classes as you wish.

Loading entity configuration classes

We have created special static method for loading entity configuration , this method is used internally when configuration scheme is being created or loaded, for this tasks you should use :

Switching configuration

If you want to change current active manager configuration use should use method:

IMPORTANT! Entity configuration for same environments in different locations are ovveritten.

Event system

This module has only one external dependency - Event system and all interoperabily with outside world must me done using this approach. Currently module does not firing any events, but has 2 subscriptions:


All versions of php_config with dependencies

PHP Build Version
Package Version
Requires samsonos/php_event Version 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 samsonos/php_config contains the following files

Loading the files please wait ....