2017 © Pedro Peláez
 

library console

Console framework (artisan, commands, visibility, recursive)

image

corex/console

Console framework (artisan, commands, visibility, recursive)

  • Friday, April 6, 2018
  • by corex
  • Repository
  • 0 Watchers
  • 0 Stars
  • 31 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 5 Versions
  • 24 % Grown

The README.md

CoRex Console

Console framework based on illuminate/console (artisan, commands, visibility)., (*1)

License Build Status codecov, (*2)

Laravel has a package called illuminate/console which makes an excellent job of serving commands., (*3)

Package corex/console makes it possible to have commands outside Laravel + a little more., (*4)

  • Support for Commands using Laravel's implementation of commands.
  • Support for Commands using Symfony's implementation of commands.

Installation

  • Run "composer require corex/console".

Commands (internal).

  • make:artisan - This command creates a new "artisan" in project root (created artisan can be modified to suit your needs).
  • make:command - This command creates a new command in current directory.

A note on "artisan" file. - It is possible to specify array of parameters or signature, on "$artisan->execute()" so it will execute command instead of showing list of commands. - It is possible to override the property $hidden on commands on adding indidual command or scan for commands., (*5)

Command

Go to Laravel's documentation to read how to write commands., (*6)

Every command created must end in "Command.php" i.e. "MyCommand.php". Otherwise it will not be added to list of available commands. It is possible to change that in Artisan setup., (*7)

When using "make:command" the created command will extend CoRex\Console\BaseCommand which extends Illuminate\Console\Command., (*8)

Following methods exists on BaseCommand. - write() - Outputs text to console with no linebreak. - writeln() - Outputs text to console with linebreak. - header() - Outputs a header followed by a separator. - separator() - Outputs a separator. - words() - Outputs array of words separated (implode()). - properties() - Outputs associative array key/value line by line. - setLineLength() - This sets length of line i.e. used in separators. - setLineLengthFull() - This sets length of line to i.e. used in separators to length of terminal. - getLineLength() - Gets the length of i.e. separators. - throwError() - Throw styled exception (white on red)., (*9)

The Versions

06/04 2018

dev-master

9999999-dev

Console framework (artisan, commands, visibility, recursive)

  Sources   Download

MIT

The Requires

 

The Development Requires

command console

06/04 2018

dev-develop

dev-develop

Console framework (artisan, commands, visibility, recursive)

  Sources   Download

MIT

The Requires

 

The Development Requires

command console

06/04 2018

1.0.2

1.0.2.0

Console framework (artisan, commands, visibility, recursive)

  Sources   Download

MIT

The Requires

 

The Development Requires

command console

05/04 2018

1.0.1

1.0.1.0

Console framework (artisan, commands, visibility, recursive)

  Sources   Download

MIT

The Requires

 

The Development Requires

command console

28/03 2018

1.0.0

1.0.0.0

Console framework (artisan, commands, visibility, recursive)

  Sources   Download

MIT

The Requires

 

The Development Requires

command console