GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - lonalore/batch: e107 (v2) plugin - API for Batch operations.

BranchesTags
Open more actions menu

Latest commit

 

History

21 Commits
21 Commits

Folders and files

NameName
Last commit message
Last commit date
includes
includes
 
 
js
js
 
 
languages/English
languages/English
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
batch.php
batch.php
 
 
batch_sql.php
batch_sql.php
 
 
e_url.php
e_url.php
 
 
example.php
example.php
 
 
plugin.xml
plugin.xml
 
 

Repository files navigation

Batch API

e107 (v2) plugin - API for Batch operations.

Batch processing API for processes to run in multiple HTTP requests.

Example:

$batch = array(
	'title' => t('Exporting'),
	'operations' => array(
		array('my_function_1', array($author, 'story')),
		array('my_function_2', array()),
	),
	'finished' => 'my_finished_callback',
	'file' => '{e_PLUGIN}plugin/path/file.php',
);

batch_set($batch);
// Setting redirect in batch_process.
batch_process(e_HTTP);

Note: if the batch 'title', 'init_message', 'progress_message', or 'error_message' could contain any user input, it is the responsibility of the code calling batch_set($batch); to sanitize them first with a function like e107::getParser()->filter(). Furthermore, if the batch operation returns any user input in the 'results' or 'message' keys of $context, it must also sanitize them first.

Batch API operations are added as new batch sets. Batch sets are used to spread processing over several page requests. This helps to ensure that the processing is not interrupted due to PHP timeouts, while users are still able to receive feedback on the progress of the ongoing operations. Combining related operations into distinct batch sets provides clean code independence for each batch set, ensuring that two or more batches, submitted independently, can be processed without mutual interference. Each batch set may specify its own set of operations and results, produce its own UI messages, and trigger its own 'finished' callback. Batch sets are processed sequentially, with the progress bar starting afresh for each new set.

For more details please see example.php file.

Screenshots

In action

Finished

Support on Beerpay

Hey dude! Help me out for a couple of 🍻!

Beerpay Beerpay

About

e107 (v2) plugin - API for Batch operations.

Topics

batchbatch-apibatch-sete107e107-pluginplugin

Resources

Readme
GPL-3.0 license
Activity

Stars

2 stars

Watchers

2 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.