2017 © Pedro PelĂĄez
 

library batch-manager

The BatchManager is an attempt to port the Drupal Batch API to the Zend Framework 2 event-driven, service-oriented arquitecture.

image

neoglez/batch-manager

The BatchManager is an attempt to port the Drupal Batch API to the Zend Framework 2 event-driven, service-oriented arquitecture.

  • Friday, July 27, 2018
  • by neoglez
  • Repository
  • 1 Watchers
  • 2 Stars
  • 898 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 2 % Grown

The README.md

BatchManager

Build Status Code Coverage Scrutinizer Code Quality, (*1)

Introduction

The BatchManager is an attempt to port the Drupal Batch API to the Zend Framework 3 event-driven, service-oriented arquitecture. The batch manager can be used to simulate or even implement asynchronous processing. It also tries to solve (in a rather naive way) the problem of scalability in a PHP environment where you usually have to increase the maximum execution time to accomplish a task depending on the size of some input. The Drupal Batch API is a very simple but powerful idea for a lot of practical use cases. If you are not familiar with it [go and give it a try] (https://www.drupal.org/node/180528). So why then write this module? Well, Drupal Batch API depends on Drupal, which is a framework but also a CMS, so in my opinion it isn’t flexible enough; I also think that Drupal’s hook-philosophy reassemble that of an event driven, but with some limitations so this module aims to decouple the functionality while using the comprehensive ZF2 EventManager component., (*2)

Installation

Main setup

With composer

  1. Load neoglez/batch-manager in your composer.json file., (*3)

    "require": {
        "neoglez/batch-manager": "dev-master"
    }
    
  2. Update composer, (*4)

$ php composer.phar update

By cloning project

If you do not want to use composer, clone this project (either as a git submodule or not) into ./vendor/ directory., (*5)

Post installation

  1. Enable BatchManager in your application.config.phpfile., (*6)

    <?php
    return array(
        'modules' => array(
            // ...
            'BatchManager',
        ),
        // ...
    );
    
  2. To be able to use the assets under /batch-manager/public you can either install the module AssetManager or copy the files to your public directory., (*7)

Creating the table

You must create the required table in order to use the default BatchManager\Mapper\DbBatchMapper. You may use the schema located in data/batch.sql., (*8)

>mysql database < data/batch.sql, (*9)

The Versions