Skip to content
Dump Zend Framework config to the terminal
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
examples
src/ZFConfigDump
.gitignore
LICENSE
Module.php
README.md
composer.json
composer.lock

README.md

zf-config-dump

A Zend Framework 2 module that provides a simple method for dumping an application's current configuration array to the commend line.

This is useful when some of the application’s configuration is set via environment variables, as is common when using container services.

Installing

zf-config-dump can be installed with Composer. Run this command:

composer require nsmithuk/zf-config-dump

Then you need to add ZFConfigDump to your config/application.config.php file under the modules key.

Usage and example output

Once installed, call the following to get the whole config output:

php public/index.php dump-config

Example output

If you only want to return the config for a specific key, you can add a filter. For example, to just return the config for your database, you can call:

php public/index.php dump-config database

Example output

You can also use dot notation to access deeper keys within the config. For example, to access the value set for just the database adapter:

php public/index.php dump-config database.adapter

Example output

You can’t perform that action at this time.