Download the PHP package asika/simple-console without Composer

On this page you can find all versions of the php package asika/simple-console. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package simple-console

PHP Simple Console

Single file console framework to help you write build scripts.

Installation

Use composer:

Or downlaod single file to use: Download Here

Getting Started

Use closure

Or Create your own class.

Show HELP

Add -h or --help to show usage, you can add custom usage to $this->help, or override $this->getHelp().

If you want to change h and help option, override $this->helpOptions = array('...').

Handle Error

Just throw Exception in doExecute(), Console will auto catch error.

Add -v to show backtrace if error.

Handle Wrong Arguments

Wrong Argument use \Asika\SimpleConsole\CommandArgsException

Console will auto show help information.

Multiple Commands

Use delegate() to delegate to different methods.

Now you can add sub commands

If you want to strip first argument after delgated, you can follow this code:

Now can use getArgument(0) in sub method and ignore the first command name.

The is another way:

API

getArgument($order[, $default = null])

setArgument($order, $$value)

getOption($name: array|string[, $default = null])

Get option --foo

Get option -f or --foo, first match will return.

NOTE: -abc will convert to a => 1, b => 1, c => 1 And -vvv will convert to v => 3

setOption($name, $value)

Set otpion to toption list. $name also support array.

out($string[, $newline: bool = false])

Write to STDOUT,

err($string[, $newline: bool = false])

Write to STDERR

in($string[$default = null, $bool = false)

Ask a question, read from STDIN

Read as boolean, add true to third argument:

exec($cmd)

A proxy to execute a cmd by exec() and return value.

It will add a title >> {your command} before exec so you will know what has been executed.


All versions of simple-console with dependencies

PHP Build Version
Package Version
No informations.
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package asika/simple-console contains the following files

Loading the files please wait ....