PHP code example of underpin / background-process-loader
1. Go to this page and download the library: Download underpin/background-process-loader library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
underpin / background-process-loader example snippets
underpin()->async_requests()->add( 'key', [
'action' => 'key', // Action Name. Must be unique.
'task_action_callback' => function () { // Callback to fire
// do things
},
] );
underpin()->background_processes()->add( 'example', [
'action' => 'example_action_name', // Action Name. Must be unique.
'task_action_callback' => function ( $item ) { // Callback to fire on a single item.
// Do an action
},
] );