Download the PHP package di/expression-parser without Composer

On this page you can find all versions of the php package di/expression-parser. 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 expression-parser

⛓ Expression Parser v0.2.3

Build Status Last version License

This package allows to evaluate (parse with mapping) large amounts of data in flexible manner, providing various processing functions:

🔩 Install

composer install di/expression-parser

⚒ Usage

👀 Example

Standard function handlers

🔗 Parameter substitution

📥 Input:

📤 Output: 1

🔗 Parameter substitution with has() function

📥 Input:

📤 Output: true

🔗 Substitution with in_array() function and scalar value

📥 Input:

📤 Output: true

🔗 Nested in_array() and explode() function and scalar value

📥 Input:

📤 Output: true

🔗 Substitution with matches_in_array() function

📥 Input:

📤 Output: true

🔗 Nested explode() is_empty() and functions

📥 Input:

📤 Output: true

🔗 implode() with inline parameter substitution

📥 Input:

📤 Output: hello world

🔗 implode() with inline parameter substitution and a separator flag

📥 Input:

📤 Output: hello,world

🔗 explode() with array substitution

📥 Input:

📤 Output: ['Pantry', 'Study']

Standard handlers with one or multiple flags

🔗 explode() with array substitution and a separator flag

📥 Input:

📤 Output: ['Pantry', 'Study']

🔗 get() function with count and nullable flags

📥 Input:

📤 Output: 3

🔗 Nested mapping with map flag in get() function

📥 Input:

📤 Output: 2

🔗 Case sensitive matching in array with sensitive flag

📥 Input:

📤 Output: false

Logical handlers

🔗 equal() function

📥 Input:

📤 Output: true

🔗 great_than() function

📥 Input:

📤 Output: true

🔗 Nested not() and equal() functions

📥 Input:

📤 Output: true

🔗 Nested not() and equal() functions

📥 Input:

📤 Output: true

Complex functions with unlimited nesting level

🔗 Multiple function parameter substitution with nesting with and_x()

📥 Input:

📤 Output: true

🔗 Multiple function parameter substitution with nesting with or_x()

📥 Input:

📤 Output: true

🔗 Multiple function parameter substitution with nesting with or_x() and not()

📥 Input:

📤 Output: true

😳 Multiple nesting with a Closure

📥 Input:

📤 Output: 20

Laravel Collection helpers

The package already has a built-in support of Laravel Collection helpers. For more informations about the available functions it supports please refer to the original Laravel Collection documentation page.

🔗 Example usage of Laravel Collection functions

📥 Input:

📤 Output: 'value 1'

Extending with custom handlers

In order to extend or override current functionality, you will need to add your own handler class name to config/handlers.php file:

😍 Contribution

Please feel free to fork and help developing.

📃 License

MIT


All versions of expression-parser with dependencies

PHP Build Version
Package Version
Requires tightenco/collect Version ^5.6
phpunit/phpunit Version ^7.1
nikic/php-parser Version ^4.0@dev
localheinz/json-normalizer Version dev-master
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 di/expression-parser contains the following files

Loading the files please wait ....