2017 © Pedro Peláez
 

library console-commands

Console commands in PHP

image

suncat/console-commands

Console commands in PHP

  • Thursday, March 21, 2013
  • by suncat2000
  • Repository
  • 1 Watchers
  • 12 Stars
  • 180 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 1 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Console commands tool in PHP

Tool to quickly write console commands in PHP. It is based on a Symfony Console Component., (*1)

Depends: * symfony/console * symfony/finder, (*2)

Installation

Create project with Composer:, (*3)

$ composer create-project suncat/console-commands ./cmd

go to the cmd directory with project:, (*4)

$ cd ./cmd

Done!, (*5)

Usage

Look at list available commands, (*6)

$ app/console list

...
Available commands:
    generate   Generate skeleton class for new command
    help       Displays help for a command
    list       Lists commands
    test       Command test

Generate skeleton command class:, (*7)

$ app/console generate

Write name of your command class in console dialog:, (*8)

Please enter the name of the command class: AcmeCommand, (*9)

Get the answer:, (*10)

Generated new command class to "./cmd/src/Command/AcmeCommand.php"

Look at list available commands, (*11)

$ app/console list

...
Available commands:
    acme       Command acme
    generate   Generate skeleton class for new command
    help       Displays help for a command
    list       Lists commands
    test       Command test

Execute your command acme:, (*12)

$ app/console acme
Execute

Now you can change the logic of your command class on your own., (*13)

If the name of your command class will be in CamelCase you get camel:case command., (*14)

The Versions

21/03 2013

v1.0.0

1.0.0.0

Console commands in PHP

  Sources   Download

The Requires