定制 mnapoli/silly 二次开发

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

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

mnapoli/silly

最新稳定版本:1.9.1

Composer 安装命令:

composer require mnapoli/silly

包简介

Silly CLI micro-framework based on Symfony Console

README 文档

README

currentMenu
home

Silly CLI micro-framework based on Symfony Console.

Build Status Coverage Status Scrutinizer Code Quality Packagist

Professional support for Silly is available via Tidelift

Installation

$ composer require mnapoli/silly

Usage

Example of a Silly application:

use Symfony\Component\Console\Output\OutputInterface;

$app = new Silly\Application();

$app->command('greet [name] [--yell]', function ($name, $yell, OutputInterface $output) {
    $text = $name ? "Hello, $name" : "Hello";

    if ($yell) {
        $text = strtoupper($text);
    }

    $output->writeln($text);
});

$app->run();

Running the application is the same as running any other Symfony Console application:

$ php application.php greet
Hello
$ php application.php greet john --yell
HELLO JOHN
$ php application.php greet --yell john
HELLO JOHN

Silly\Application extends Symfony\Console\Application and can be used wherever Symfony's Application can.

Documentation

Do more

Silly is just an implementation over the Symfony Console. Read the Symfony documentation to learn everything you can do with it.

Example applications

Interested in seeing examples of Silly applications? Have a look at this short selection:

Contributing

See the CONTRIBUTING file.

统计信息

  • 总下载量: 10.3M
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 936
  • 点击次数: 2
  • 依赖项目数: 139
  • 推荐数: 3

GitHub 信息

  • Stars: 930
  • Watchers: 17
  • Forks: 51
  • 开发语言: PHP

其他信息

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