Download the PHP package victordzmr/conf2json without Composer
On this page you can find all versions of the php package victordzmr/conf2json. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download victordzmr/conf2json
More information about victordzmr/conf2json
Files in victordzmr/conf2json
Package conf2json
Short Description Library that converts PHP configuration files to JSON. It also includes a command-line interface.
License MIT
Homepage https://github.com/victordzmr/conf2json
Informations about the package conf2json
conf2json
Library that converts PHP configuration files to JSON. It also includes a command-line interface.
PHP configuration files are regular PHP files that return an array. They may be used to define configurations and language strings, among others.
In some cases it is necessary to convert these files to JSON to make them readable from other environments.
Features
- Converts single files and directories recursively.
- Allows to export minified and human-readable JSON files.
- Includes a command-line interface to use the library from the shell.
License
This software is distributed under the MIT license. Please read LICENSE for information on the software availability and distribution.
Installation
This library requires Composer and PHP 7 or later.
Usage
PHP library
Command-line interface
Arguments
input
is the file or directory that contains the files to be converted. Default: current directory.output
is the directory where the output files will be saved. Default: current directory.pretty
defines whether the output files must be encoded using the JSON_PRETTY_PRINT option. Default: true.recursive
determines whether the conversion must be recursive when the input is a directory. Default: true.verbose
defines whether the library should print information to standard and error outputs. Default: false from the library and true from the CLI.