Download the PHP package lamoda/multi-env without Composer
On this page you can find all versions of the php package lamoda/multi-env. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download lamoda/multi-env
More information about lamoda/multi-env
Files in lamoda/multi-env
Package multi-env
Short Description Library that provides classes to work with envs in multitenant environment
License MIT
Informations about the package multi-env
Lamoda multi-env
Library that provides classes to work with envs in multitenant environment
Library based on params passed to it on initialization stage will decide which env variable should be used for current request.
Installation
- Install library with composer:
Usage
Library usage examples to work in not multitenant environment (could be useful in development mode)
Library usage examples to work in multitenant environment
Library set up by build in factory
-
Library set up for work with env in file stored in different directories
- Library set up for work with env with prefixes
Library set up with multiple strategy
Available HostDetectorInterface implementations
-
\Lamoda\MultiEnv\HostDetector\ServerHeadersBasedHostDetector - use to identificate host via HTTP request
-
\Lamoda\MultiEnv\HostDetector\CliArgsBasedHostDetector - use to identificate host via Cli script run
- \Lamoda\MultiEnv\HostDetector\FirstSuccessfulHostDetector - use to aggregate multiple HostDetector's
Available FormatterInterface implementations
-
\Lamoda\MultiEnv\Formatter\PrefixAppendFormatter - append prefix and delimiter to original string. Combine original string, delimiter,host id in order *host id*, *delimiter*, *original string*
-
\Lamoda\MultiEnv\Formatter\SuffixAppendFormatter - append suffix and delimiter to original string. Combine original string, delimiter,host id in order *original string*, *delimiter*, *host id*
-
\Lamoda\MultiEnv\Formatter\CharReplaceFormatter - act like strreplace in PHP. Could be useful to replace illegal char '-' to '\\' when you access to env variable
- \Lamoda\MultiEnv\Formatter\FormatterPipeline - aggregate few formatters. Iterate through them and apply each to original stirng