Download the PHP package yuloh/pipeline without Composer

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

Pipeline

Latest Version on Packagist Build Status

Introduction

yuloh/pipeline is a simple functional pipeline. You can easily chain functions together to process a payload. It's a lot easier to read, and there are less temporary variables than doing it the old fashioned way.

Goals

This package aims to expose the simplest API possible.

The programming language elixir has a pipe operator (|>) which lets you easily chain functions:

I really liked that syntax, and I wanted to write a pipeline package where I didn't have to write pipe or add over and over, hence this package.

Why PHP 7 Only?

PHP 7 introduced the Uniform Variable Syntax, which means we can do this:

Instead of something like this:

Install

Via Composer

Usage

To create a new pipeline, invoke the Yuloh\Pipeline\pipe function with your payload.

Once it's created you can keep chaining stages by invoking the pipeline. The stage must be a valid PHP callable.

If you invoke the pipeline without a stage, the pipeline will be processed and the processed payload is returned.

All together, it looks like this:

Passing Arguments

When adding a stage, any additional arguments will be passed to the stage after the payload. For instance, if you were processing a JSON payload the pipeline might look like this:

In the previous example, json_decode would be invoked as json_decode($payload, true) to return an array.

Alternative Method Call Usage

You can also add stages as method calls instead of function arguments. It's a little more readable for pipelines that are only using standard functions.

Testing

License

The MIT License (MIT). Please see License File for more information.


All versions of pipeline with dependencies

PHP Build Version
Package Version
Requires php Version >=7.0
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 yuloh/pipeline contains the following files

Loading the files please wait ....