Coder Social home page Coder Social logo

xcorp1986 / silly Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mnapoli/silly

0.0 2.0 0.0 489 KB

Silly CLI micro-framework based on Symfony Console

Home Page: http://mnapoli.fr/silly/

License: MIT License

PHP 82.85% CSS 9.83% HTML 7.32%

silly's Introduction

currentMenu
home

Silly CLI micro-framework based on Symfony Console.

Build Status Coverage Status Scrutinizer Code Quality Packagist

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) {
    if ($name) {
        $text = 'Hello, '.$name;
    } else {
        $text = '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.

Contributing

See the CONTRIBUTING file.

silly's People

Contributors

aydinhassan avatar climence avatar henriquemoody avatar holtkamp avatar k-phoen avatar lalop avatar mnapoli avatar stof avatar tentacode avatar thecrypticace avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.