technodelight / symfony-configuration-cli-initialiser
交互式初始化您的Symfony配置
2.0.0
2022-11-15 12:50 UTC
Requires
- symfony/config: >=2.7
- symfony/console: >=2.7
This package is auto-updated.
Last update: 2024-09-15 16:58:56 UTC
README
交互式初始化您的配置
安装
通过composer。
composer require technodelight/symfony-configuration-cli-initialiser
用法
<?php use Technodelight\SymfonyConfigurationInitialiser\Initialiser; use Your\Own\SymfonyConfiguration as Configuration; use Symfony\Component\Console\Input\ArgvInput; use Symfony\Component\Console\Output\ConsoleOutput; use Symfony\Component\Yaml\Yaml; $input = new ArgvInput; $output = new ConsoleOutput; $init = new Initialiser; $config = $init->init(new Configuration, $input, $output); file_put_contents('./inited-config.yml', Yaml::dump($config)); // you can use any kind of dumper here
许可
MIT许可(MIT)
版权所有 © 2018 Zsolt Gál
特此授予任何获得此软件及其相关文档副本(“软件”)的人免费权利,包括但不限于使用、复制、修改、合并、发布、分发、再许可和/或销售软件副本,并允许向获得软件的人提供副本,前提是遵守以下条件
上述版权声明和本许可声明应包含在软件的所有副本或主要部分中。
软件按“现状”提供,不提供任何形式的保证,无论是明示的还是暗示的,包括但不限于适销性、特定用途适用性和非侵权性保证。在任何情况下,作者或版权持有人不对任何索赔、损害或其他责任承担责任,无论此类责任是基于合同、侵权或其他方式产生,是否与软件或其使用或其他方式有关。