Download the PHP package cekurte/environment without Composer

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

Environment

Build Status Code Climate Coverage Status Latest Stable Version License SensioLabsInsight

Installation

Documentation

Setup your variables to PHP with putenv("KEY=VALUE") or put your environment variables into OS directly. Additionally you can use this library to perform this task vlucas/phpdotenv (we recommend that you use this library).

And now, use our library to get values and increase the power of your environment variables.

This command will get the value of the environment variable and will convert values to respective php data type.

Actually are available the following resources to process your environment variables:

Examples

In this section you can see the examples to all resource types.

ArrayResource

The array resource parse a value from environment variable that is a string to the array php data type. Supposing that there exists an environment variable named "ENV_ARRAY" with the following value [1,2,3,"key"=>"value"].

When you read this environment variable with our library, then it will convert the data to the correct data type (in this case to array) using the ArrayResource class.

BooleanResource

The boolean resource parse a value from environment variable that is a string to the boolean php data type. Supposing that there exists an environment variable named "ENV_BOOL" with the following value true.

When you read this environment variable with our library, then it will convert the data to the correct data type (in this case to boolean) using the BooleanResource class.

JsonResource

The json resource parse a value from environment variable that is a string to the array php data type. Supposing that there exists an environment variable named "ENV_JSON" with the following value {"key":"value"}.

When you read this environment variable with our library, then it will convert the data to the correct data type (in this case to array) using the JsonResource class.

NullResource

The null resource parse a value from environment variable that is a string to the null php data type. Supposing that there exists an environment variable named "ENV_NULL" with the following value null.

When you read this environment variable with our library, then it will convert the data to the correct data type (in this case to null) using the NullResource class.

NumericResource

The numeric resource parse a value from environment variable that is a string to the numeric php data type (an integer or a float). Supposing that there exists an environment variable named "ENV_NUMERIC" with the following value 123.

When you read this environment variable with our library, then it will convert the data to the correct data type (in this case to int) using the NumericResource class.

UnknownResource

The unknown resource no parse the values from environment variable and is used to get values when all resource types can not parse the data. Supposing that there exists an environment variable named "ENV_UNKNOWN" with the following value "unknown".

When you read this environment variable with our library, then it will get the raw value using the UnknownResource class.

If you liked of this library, give me a star =).

Contributing

  1. Give me a star =)
  2. Fork it
  3. Create your feature branch (git checkout -b my-new-feature)
  4. Make your changes
  5. Run the tests, adding new ones for your own code if necessary (vendor/bin/phpunit)
  6. Commit your changes (git commit -am 'Added some feature')
  7. Push to the branch (git push origin my-new-feature)
  8. Create new Pull Request

All versions of environment with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4
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 cekurte/environment contains the following files

Loading the files please wait ....