Download the PHP package anexia/param-parser without Composer
On this page you can find all versions of the php package anexia/param-parser. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download anexia/param-parser
More information about anexia/param-parser
Files in anexia/param-parser
Package param-parser
Short Description Parses param placeholders within an arbitrary string
License MIT
Homepage https://github.com/anexia/php-param-parser
Informations about the package param-parser
param-parser
param-parser
is a parser library for a param string expression. Those expressions are arbitrary strings with
placeholders in it, where a placeholder consists of a name, an optional type and a list of options.
Install
With a correctly set up PHP and composer installation, run:
Getting started
Examples of param string expressions look as follows:
As you see, a param is introduced by an opening curly bracket, followed by the name of the param, a colon, the type of the param, another colon and a comma separated list of options. The param configuration gets terminated by a closing curly bracket. Note that the type and option configuration are optional, but the name is mandatory.
To parse an expression shown above, use the PHP code as follows:
It is also possible to escape opening curly brackets, closing curly brackets, colons and commas as follows:
Supported versions
Supported | |
---|---|
PHP 7.1 | ✓ |
PHP 7.2 | ✓ |
PHP 7.3 | ✓ |
PHP 7.4 | ✓ |
PHP 8.0 | ✓ |
PHP 8.1 | ✓ |
List of developers
- Andreas Stocker [email protected], Lead Developer