Download the PHP package yeriomin/console-app without Composer
On this page you can find all versions of the php package yeriomin/console-app. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download yeriomin/console-app
More information about yeriomin/console-app
Files in yeriomin/console-app
Download yeriomin/console-app
More information about yeriomin/console-app
Files in yeriomin/console-app
Vendor yeriomin
Package console-app
Short Description A skeleton PHP console app with helpers for logging, running in a single instance, console input parameters.
License MIT
Package console-app
Short Description A skeleton PHP console app with helpers for logging, running in a single instance, console input parameters.
License MIT
Please rate this library. Is it a good library?
Informations about the package console-app
console-app
A skeleton PHP console app.
Usage
Install console-app as a dependency
$ composer require yeriomin/console-app
Extend \Yeriomin\ConsoleApp\ConsoelApp
class and implement the run()
method.
Features
- Handles configuration files. Tries to read
./config.ini
by default. - Handles console arguments. Extend
getGetopt()
method to add your options. - Checks if another instance of the same script is running. Can be disabled in config.
- Checks if script is running in the console. Fails otherwise. Can be disabled in config.
- Inits monolog logger.
- Uses error and signal handlers to let you see that very important last message in the log.
Configuration
By default the following configuration options are supported:
consoleOnly
Let the script run only in console, not in browser. True by default.oneInstanceOnly
Let only one instance of the script be running at any time. True by default.logDir
Directory to put the log file to. Defaults to system temporary directory.logFile
A specific file path for the log. If none provided/tmp/<script-class-name>.log
is used.lockDir
Directory to put the lock file to. Defaults to system temporary directory.lockFile
A specific file path for the lock file. If none provided/tmp/<script-class-name>.lock
is used.
Console arguments
Two console options are supported by default:
-h|--help
Shows usage message. It will include options you add.-c|--config
Path to configuration file. Defaults to./config.ini
All versions of console-app with dependencies
PHP Build Version
Package Version
Requires
php Version
>=5.3.0
monolog/monolog Version >=1.8.0
yeriomin/getopt Version >=1.0
caseyamcl/configula Version ~2.3
monolog/monolog Version >=1.8.0
yeriomin/getopt Version >=1.0
caseyamcl/configula Version ~2.3
The package yeriomin/console-app contains the following files
Loading the files please wait ....