{"id":24010998,"url":"https://github.com/lonalore/batch","last_synced_at":"2025-06-16T07:06:12.847Z","repository":{"id":75225802,"uuid":"76020072","full_name":"lonalore/batch","owner":"lonalore","description":"e107 (v2) plugin - API for Batch operations.","archived":false,"fork":false,"pushed_at":"2019-07-03T09:34:58.000Z","size":42,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-16T07:06:12.552Z","etag":null,"topics":["batch","batch-api","batch-set","e107","e107-plugin","plugin"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lonalore.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-12-09T09:13:54.000Z","updated_at":"2019-07-03T09:35:00.000Z","dependencies_parsed_at":"2023-06-05T19:00:16.167Z","dependency_job_id":null,"html_url":"https://github.com/lonalore/batch","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/lonalore/batch","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lonalore%2Fbatch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lonalore%2Fbatch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lonalore%2Fbatch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lonalore%2Fbatch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lonalore","download_url":"https://codeload.github.com/lonalore/batch/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lonalore%2Fbatch/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260116647,"owners_count":22961064,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["batch","batch-api","batch-set","e107","e107-plugin","plugin"],"created_at":"2025-01-08T04:43:45.311Z","updated_at":"2025-06-16T07:06:12.840Z","avatar_url":"https://github.com/lonalore.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"Batch API\n=========\n\n\u003e e107 (v2) plugin - API for Batch operations.\n\nBatch processing API for processes to run in multiple HTTP requests.\n\n**Example**:\n```php\n$batch = array(\n\t'title' =\u003e t('Exporting'),\n\t'operations' =\u003e array(\n\t\tarray('my_function_1', array($author, 'story')),\n\t\tarray('my_function_2', array()),\n\t),\n\t'finished' =\u003e 'my_finished_callback',\n\t'file' =\u003e '{e_PLUGIN}plugin/path/file.php',\n);\n\nbatch_set($batch);\n// Setting redirect in batch_process.\nbatch_process(e_HTTP);\n```\n\n**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()-\u003efilter()`. Furthermore, if the batch operation returns any user input in the 'results' or 'message' keys of $context, it must also sanitize them first.\n\nBatch 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.\n\nFor more details please see `example.php` file.\n\n### Screenshots\n\n![In action](https://www.dropbox.com/s/msya3noqmvl8f3y/01.png?dl=1)\n\n![Finished](https://www.dropbox.com/s/wtbbua9nuerrvxt/02.png?dl=1)\n\n## Support on Beerpay\nHey dude! Help me out for a couple of :beers:!\n\n[![Beerpay](https://beerpay.io/lonalore/batch/badge.svg?style=beer-square)](https://beerpay.io/lonalore/batch)  [![Beerpay](https://beerpay.io/lonalore/batch/make-wish.svg?style=flat-square)](https://beerpay.io/lonalore/batch?focus=wish)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flonalore%2Fbatch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flonalore%2Fbatch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flonalore%2Fbatch/lists"}