net_bazzline / php_configuration_format_converter
用于转换以下配置格式的php:xml、php数组、yaml、json
v1.0.0
2013-06-07 21:04 UTC
Requires
- php: >=5.3.3
- net_bazzline/php_component_converter: dev-master
- net_bazzline/php_symfony_console_application: dev-master
Requires (Dev)
- mikey179/vfsstream: dev-master
- mockery/mockery: dev-master
- phpunit/phpunit: 3.7.*
This package is auto-updated.
Last update: 2024-09-16 21:12:08 UTC
README
A cli tool to convert files from and to yaml, json, xml or php array
安装
通过以下方式安装:* git clone
https://github.com/stevleibelt/php_configuration_format_converter * composer and packagist.org "net_bazzline/php_configuration_format_converter": "dev-master"
使用
通过控制台切换到目录,并输入 bin/net_bazzline_configuration_format_converter.php
。这将显示帮助屏幕。
要开始转换,在convert
命令后面添加源和目标。
bin/net_bazzline_configuration_format_converter.php convert my/source/file.yaml my/destination/file.php
工具将根据给定的文件扩展名来决定如何处理转换。文件扩展名可以是大写、小写,或者任何大小写。
支持的格式
目前支持的格式如下:* YAML * XML * JSON * php数组
示例
查看目录 examples 以开始尝试。
注意
如果目标文件已经存在,转换器将停止工作。
如果您想覆盖该文件,必须添加选项 --force
。