2017 © Pedro Peláez
 

library console

console handle for php cli

image

ghign0/console

console handle for php cli

  • Tuesday, May 29, 2018
  • by ghign0
  • Repository
  • 1 Watchers
  • 0 Stars
  • 2 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 7 Versions
  • 0 % Grown

The README.md

SIMPLE CONSOLE

This is a simple php console for php cli applications, (*1)

Installation

composer require ghign0/console

usage

include __DIR__."/../vendor/autoload.php";

use Console\Console;

$console = new Console([
    'command' => \Path\To\Class\CommandClass::class
]);
$console->run();

Native commands are : * help * version * quit, (*2)

Other Commands can be added in Console creation passing an array of commands In the example, a command 'command' has been added., (*3)

A Command must implements CommandInterface and can implements CommandAdminInterfacae., (*4)

namespace Console\Command;

interface CommandInterface
{
    public function getCommand();

    public function execute();

    public function help();

}

When a command is called, the method execute() is executed.
It must return a string, to be written in the console by ConsoleHandler, (*5)

You can add custom text colors by adding Color::COLOR in you string, where COLOR can be YELLOW, GREEN, RED, BLUE etc.
For the complete list visit its page on Packagelist.org., (*6)

The Versions

29/05 2018

dev-master

9999999-dev

console handle for php cli

  Sources   Download

MIT

The Requires

 

by Marco Ghinassi

29/05 2018

dev-develop

dev-develop

console handle for php cli

  Sources   Download

MIT

The Requires

 

by Marco Ghinassi

29/05 2018

1.2.1

1.2.1.0

console handle for php cli

  Sources   Download

MIT

The Requires

 

by Marco Ghinassi

28/05 2018

1.1.2

1.1.2.0

console handle for php cli

  Sources   Download

MIT

The Requires

 

by Marco Ghinassi

28/05 2018

1.1.1

1.1.1.0

console handle for php cli

  Sources   Download

MIT

The Requires

 

by Marco Ghinassi

28/05 2018

1.1

1.1.0.0

console handle for php cli

  Sources   Download

MIT

The Requires

 

by Marco Ghinassi

28/05 2018

1.0

1.0.0.0

console handle for php cli

  Sources   Download

MIT

The Requires

 

by Marco Ghinassi