定制 phpfriends/console-questionnaire 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

phpfriends/console-questionnaire

Composer 安装命令:

composer require phpfriends/console-questionnaire

包简介

A questionnarie for console apps

README 文档

README

A questionnarie for console apps

(www.pskel.tk)[Readme generated by Pskel on 2016-11-12 10:17:12]

How it works ?

array of questions

$questions = [
    1 => [
        'key' => 'name',
        'statement' => 'What\'s your name',
    ],
    2 => [
        'key' => 'age',
        'statement' => 'What\'t your age range',
        'options' => [
            '< 18',
            '18-39',
            '> 39',
        ],
    ],
    // ...
];

The method questionsLoop needs that array of questions and another array to store the results. Also this results array should contains the current values.

Like that

$data = [
    'name' => 'John Doe',
    'age' => '18-39',
    // ...
];

This is an example you can play with:

➜  ConsoleQuestionnaire git:(master) ✗ src/console demo

[1] What's your name [John Doe]
[2] What't your age range [18-39]
// ...
[X] exit

select_option [X] ?

translations

Instead of use direct messages in the questions you can use keys.

Thanks to

统计信息

  • 总下载量: 17
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-11-13

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固