Download the PHP package nowise/uup-application without Composer
On this page you can find all versions of the php package nowise/uup-application. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download nowise/uup-application
More information about nowise/uup-application
Files in nowise/uup-application
Package uup-application
Short Description Run monitored command action for CLI command line and HTTP requests.
License Apache-2.0
Homepage https://nowise.se/oss/uup/application
Informations about the package uup-application
UUP-APPLICATION
Run the same command action both for CLI command line and HTTP requests with monitoring.
ACTIONS:
The action class handles business logic and the runner executes and monitor the action.
Example
LIFETIME:
The action class derives from ApplicationAction
and implements the lifetime methods usage()
, setup()
,
execute()
and cleanup()
. At least the setup method should be implemented, the other are optional.
OPTIONS:
Command options are passed from CLI command options or HTTP request depending on execution context. The runner takes
are of handling help or quiet options. The standard options help
, version
and quiet
are transparent handled along
with their short option equivalents.
MONITOR:
The runner execute the action class and provides error monitoring. By default, runner will terminate action when a throwable get caught. The error behavior can be overridden by action class.
INLINE:
For simple tasks, use an anonymous (java-style) class with implementations of wanted methods:
See example directory for code examples.
INFORMATION:
Provide help
and version
information by overriding base class methods in your action class.
HELP
Override the usage()
method. Call parent method to output standard options.
VERSION
Similar to usage, but override the version()
instead. This method gives full control of version output.
If default version format is OK, then overriding the getVersion()
method should be sufficient.
ZERO MAINTENANCE:
Hint: Consider reading version string from your package composer.json file instead of using a hard coded string that requires manual update!