2017 © Pedro Peláez
 

library konzolo

Lightweight Console library, for PHP

image

gnugat/konzolo

Lightweight Console library, for PHP

  • Wednesday, December 3, 2014
  • by gnupat
  • Repository
  • 0 Watchers
  • 0 Stars
  • 4 Installations
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 5 Versions
  • 0 % Grown

The README.md

Konzolo

A lightweight Console library, for PHP., (*1)

It can be used to build minimalistic CLI applications, or to implement the Command design pattern., (*2)

Installation

Use Composer to install Konzolo:, (*3)

composer require gnugat/konzolo:~1.1

Example

Create a command:, (*4)

<?php

namespace Acme\Demo\Command;

use Gnugat\Konzolo\Command;
use Gnugat\Konzolo\Input;

class HelloWorldCommand implements Command
{
    public function execute(Input $input)
    {
        $name = $input->getArgument('name');
        echo "Hello $name\n";

        return Command::EXIT_SUCCESS;
    }
}

Create an application:, (*5)

<?php

require __DIR__.'/vendor/autoload.php';

use Acme\Demo\Command\HelloWorldCommand;
use Gnugat\Konzolo\Application;
use Gnugat\Konzolo\Input;

$input = new Input('hello:world');
$input->setArgument('name', $argv[1]);

$app = new Application();
$app->addCommand('hello:world', new HelloWorldCommand());
$exitCode = $app->run($input)

exit($exitCode);

Further documentation

You can see the current and past versions using one of the following:, (*6)

You can find more documentation at the following links:, (*7)

The Versions

03/12 2014

dev-master

9999999-dev

Lightweight Console library, for PHP

  Sources   Download

MIT

The Development Requires

php console lightweight

01/12 2014

v1.1.1

1.1.1.0

Lightweight Console library, for PHP

  Sources   Download

MIT

The Development Requires

php console lightweight

01/12 2014

v1.1.0

1.1.0.0

Lightweight Console library, for PHP

  Sources   Download

MIT

The Development Requires

php console lightweight

28/11 2014

v1.0.1

1.0.1.0

Lightweight Console library, for PHP

  Sources   Download

MIT

The Development Requires

php console lightweight

05/11 2014

v1.0.0

1.0.0.0

Lightweight Console library, for PHP

  Sources   Download

MIT

The Development Requires

php console lightweight