Download the PHP package nowise/uup-application-options without Composer

On this page you can find all versions of the php package nowise/uup-application-options. 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 uup-application-options

UUP-APPLICATION-OPTIONS

Supports transparent/uniform handling of runtime options from CLI command and HTTP request.

This package supports short/long options, other options and reading password from terminal (masked echo output). For HTTP request options, an optional filter can be applied.

USAGE:

In your command action class, define a method that checks whether to return command line options (CLI) or from request option (HTTP).

Calling getApplicationOptions will provide uniform access to application options, whether these come from command line or the HTTP request. From your application perspective the origin of options is transparent.

From within the application, a number of convenient methods can be used for checking if options was passed and retrieve them with type safety.

A number of other getters exist, for example for boolean, float and integer values. These takes a second default value that is returned of option is missing.

ORIGIN:

If origin matters, it can be checked:

OPTION ALIAS:

For command line options, the default behavior is to return options by stripping leading dashes ('-'). To support short command options mapped to long options, pass a mapping array.

These two short option will now be an alias for their equivalent long option. Some builtin aliases are implicit handled for command line options. These short options are:

These are processed before user defined mappings, making it possible to easily redefine the builtin mapping.

OPTION VALUES:

Option values are any value after the equal character ('='). For options without a value, the option key will be read having boolean true as its value.

DASHES:

Processing of command line options (CLI) will strip leading dashes and use the remaining string as the command option key.

OPTION FILTERING:

Command line options are considered safe. For HTTP request, it's possible to pass an array of sanitation filter to be applied.

The default behavior is to not filter HTTP request options. For larger applications, some framework for purify HTML input might be used that could be wrapped in a class that implements the FilterInterface and used instead of passing an instance of the HttpRequestFilter class.

BOOLEANS:

Special treatment of boolean options are implemented. For example, option values "1", "true", "on" and "yes" yields true. Analogous "0", "false", "off" and "no" yields false.

Example: Call getBoolean to have the value for filter option evaluated as boolean.


All versions of uup-application-options with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4
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 nowise/uup-application-options contains the following files

Loading the files please wait ....