Download the PHP package kojiro526/cakephp-env without Composer

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

Environments plugin for CakePHP

概要

サーバ変数または環境変数で設定した名前に応じて設定ファイルを切り替えるプラグインです。

必要環境

インストール

composerで以下のようにインストールします。

インストール後、config/bootstrap.phpに以下を追記します。

使い方

config/ディレクトリ配下に以下の設定ファイルを配置します。

environment.phpは常に読み込まれます。全ての環境に共通の設定などを記載します。

environmentsディレクトリ配下に配置したファイルは、名前によって以下のように読み込まれます。

  1. development.phpという名前で作成したファイルは、サーバ変数や環境変数で環境名の設定がされていない場合に読み込まれます。
  2. override.phpという名前で作成したファイルは、上記のdevelopment.phpや下記の環境名で指定された設定ファイルを読み込んだ後に読み込まれます。
    • 各開発担当者がローカル環境上で他のファイルの設定を上書きする用途などで用います。
  3. それ以外の名前で作成したファイルは、同一の環境名が設定されている場合に読み込まれます。
    • 例えば、config/environments/staging.phpというファイルは、サーバ変数や環境変数でCAKE_ENV=stagingが設定された場合に読み込まれます。

環境名の設定

環境名は、Webサーバのサーバ変数やOSの環境変数でCAKE_ENVという名前で指定します。

ローカルサーバを立ち上げる場合

以下のように環境変数を設定して起動します。

Linux、OSX

Windows

Apacheで設定する場合

サーバの設定に以下の設定を追記します。

環境名の取得

現在の環境名は以下のように取得できます。


All versions of cakephp-env with dependencies

PHP Build Version
Package Version
Requires php Version >=5.5.9
cakephp/cakephp Version >=3.0.0 <4.0.0
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 kojiro526/cakephp-env contains the following files

Loading the files please wait ....