Download the PHP package easybib/generator-processes without Composer

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

easybib/generator-processes

A collection of processes operating on iterators, usually implemented as generators

Build Status

Processes

All processes are callables which operate on an input traversable (typically an iterator) and return an iterator.

Bulk adding Elastica documents

\EasyBib\Process\Elastica::write uses Elastica to bulk write arrays of documents to Elasticsearch using an Elastica type. You may use Elastica::bindWrite($type) to retrieve a method which accepts only an iterator of document sets.

use Easybib\Process\Elastica;

$documentGroups = [
    [$doc1, $doc2, $doc3],
    [$doc4, $doc5],
];

$outputIterator = Elastica::write($elasticaType, $documentGroups);
// equivalent to
$write = Elastica::bindWrite($elasticaType);
$outputIterator = $write($documentGroups);

// $documentGroups == iterator_to_array($outputIterator);

Searching Elastica documents

EasyBib\Process\Elastica::search uses Elastica to search for a set of documents matching a given search query. You may use Elastica::bindSearch($type, $limit) to retrieve a method which accepts only a search query string and an initial search offset.

use Easybib\Process\Elastica;

$iterator = Elastica::search($elasticaIndex, 100, $keywords, 0);
// equivalent to
$search = Elastica::bindSearch($elasticaIndex, 100);
$iterator = $search($keywords, 0);

Bulkify Transformation

\EasyBib\Process\Transform::bulkify aggregates the input iterator into arrays.

use Easybib\Process\Transform;

$items = [1, 2, 3, 4];

$outputIterator = Transform::bulkify(2, $items);
// equivalent to
$bulkify = Transform::bindBulkify(2);
$outputIterator = $bulkify($items);

// [[1, 2], [3, 4]] == iterator_to_array($outputIterator)

Unbulkify Transformation

Flattens the input by a single level, thus reversing a bulkify operation.

use Easybib\Process\Transform;

$bulks = [[1, 2], [3, 4], [5, ['some', 'array']]]];

$outputIterator = Transform::unbulkify($bulks);

// [1, 2, 3, 4, 5, ['some', 'array']] == iterator_to_array($outputIterator)

All versions of generator-processes with dependencies

PHP Build Version
Package Version
Requires php Version >=5.5.0
react/partial Version ~2.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 easybib/generator-processes contains the following files

Loading the files please wait ....