redant/console 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

redant/console

最新稳定版本:1.0.5

Composer 安装命令:

composer require redant/console

包简介

Menu helper for Symfony Console component

README 文档

README

Menu select helper for Symfony Console

This menu helper is a bridge for PHPSchool's CliMenu library, so that it can easily be used inside the Symfony Console.

It provides an interactive menu that you can navigate using the arrow and enter keys.

Only compatible with UNIX tty-style terminals.

Installation

Install through composer require redant/console.

Setup

Register the helper in your HelperSet:

use RedAnt\Console\Helper\SelectHelper; // Further on in your code ... $this->getHelperSet()->set(new SelectHelper(), 'select');

Then you can start using the helper like this:

$helper = $this->getHelper('select'); $value = $helper->select( $input, 'What is your favorite food?', [ 'hamburger' => 'Hamburger', 'pizza' => 'Pizza', 'sushi' => 'Sushi', 'poke' => 'Poké bowl' ] ); // $value = 'poke' when the fourth option was chosen // $value = null when the user canceled

About

Lovingly crafted by RedAnt in Utrecht, NL.

This project is licensed under the terms of the MIT license.

统计信息

  • 总下载量: 31.79k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 22
  • 点击次数: 5
  • 依赖项目数: 3
  • 推荐数: 0

GitHub 信息

  • Stars: 22
  • Watchers: 3
  • Forks: 4
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-01-04