Download the PHP package cypresslab/php-curry without Composer

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

php-curry

Code Coverage Build Status SensioLabsInsight

An implementation for currying in PHP

Currying a function means the ability to pass a subset of arguments to a function, and receive back another function that accepts the rest of the arguments. As soon as the last one is passed it gets back the final result.

Like this:

Currying is a powerful (yet simple) concept, very popular in other, more purely functional languages. In haskell for example, currying is the default behavior for every function.

In PHP we still need to rely on a wrapper to simulate the behavior

How to install

In your PHP scripts (with composer autoloader in place) just import the namespace and use it!

Right to left

It's possible to curry a function from left (default) or from right.

Parameters as an array

You can also curry a function and pass the parameters as an array, just use the *_args version of the function.

Optional parameters

Optional parameters and currying do not play very nicely together. This library excludes optional parameters by default.

But strpos has an optional $offset parameter that by default has not been considered.

If you want to take this optional $offset parameter into account you should "fix" the curry to a given length.

curry_right has its own fixed version named curry_right_fixed

Placeholders

The function __() gets a special placeholder value used to specify "gaps" within curried functions, allowing partial application of any combination of arguments, regardless of their positions.

Notes:


All versions of php-curry with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.2
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 cypresslab/php-curry contains the following files

Loading the files please wait ....