Skip to content

Commit

Permalink
Corrects the README to be accurate for Cake 3.
Browse files Browse the repository at this point in the history
  • Loading branch information
beporter committed Feb 25, 2015
1 parent 1c3aada commit b48eea3
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,37 +2,36 @@

A CakePHP plugin that provides a Shell to read an app's Configure vars from the command line.

* For the Cake 2.x version of this plugin, please use the repo's `master` branch.
* For the Cake 1.3 version, use the `1.3` branch. (Note: we don't expect to actively maintain the 1.3 version. It's here because it started life as a 1.3 Shell.)

* This is the Cake 3.x version of the plugin, which exists on the `master` branch and is tracked by the `3.*` semver.
* For the Cake 2.x version of this plugin, please use the repo's `cake-2.x` branch. (semver `2.*`)
* For the Cake 1.3 version, use the `cake-1.3` branch. (semver `1.*`) **Note:** we don't expect to actively maintain the 1.3 version. It's here because the project started life as a 1.3 Shell.


## Requirements

* CakePHP 2.5.0+
* CakePHP 3.0.0+
* PHP 5.4.19+


## Installation

`composer require loadsys/config-read:2.*`

or
`composer require loadsys/config-read:3.*`

`git submodule add https://github.com/loadsys/CakePHP-ConfigReadShell.git Plugin/ConfigRead`


## Usage

```shell
$ cd path/to/app/
$ ./lib/Console/cake config_read.config_read Key.Name
$ ./bin/cake config_read.config_read Key.Name
'foo'
```

### Format as a bash variable definition

```shell
$ ./lib/Console/cake config_read.config_read Key.Name Second.Key
$ ./bin/cake config_read.config_read Key.Name Second.Key
KEY_NAME='foo'
SECOND_KEY_FIRST='bar'
SECOND_KEY_SECOND='baz'
Expand All @@ -42,7 +41,7 @@ SECOND_KEY_THIRD='42'
Note that this format is automatically used whenever more than one key is returned. For example, if you request a key that contains an array, all values in the array will be returned sequentially. Alternatively, if you pass multiple keys on the command line, they will be returned. The format can also be forced using the `-b` or `--bash` command line switch:

```shell
$ ./lib/Console/cake config_read.config_read -b Key.Name
$ ./bin/cake config_read.config_read -b Key.Name
KEY_NAME='foo'
```

Expand Down

0 comments on commit b48eea3

Please sign in to comment.