aeforge/terminal
最新稳定版本:1.0.0
Composer 安装命令:
composer require aeforge/terminal
包简介
AEForge terminal component. Providing a way to communicate with PHP application via a console.
README 文档
README
AEForge Terminal component. AEForge terminal component. Providing a way to communicate with PHP application via a console.
Installation
To install via composer:
composer require aeforge/terminal
To clone the project:
https://github.com/aeforge/Terminal.git
Usage/Examples
Example
//Message class is used to create an already defined styled text and blocks use Aeforge\Terminal\Message; //Terminal is the main class use Aeforge\Terminal\Terminal; // Creates a new item and added to the list. // use {} to create a parameter. Terminal::Item("myitem {unknown_parameter}", function($unknown_parameter) { echo "The unknown_parameter is : " . $unknown_parameter; }); Terminal::Item("myitem {unknown_parameter} {another_parameter}", function($unknown_parameter, $another_parameter) { (new Message)::message($unknown_parameter) . (new Message)::message($another_parameter); }); // Calling a function function myFunction($what_the_user_said) { echo $what_the_user_said; } Terminal::Item("whattext {what_the_user_said}", "myFunction"); //Always call boot at the end to start parsing the terminal items list Terminal::boot();
统计信息
- 总下载量: 4
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-10-27