PHP code example of themeplate / process

1. Go to this page and download the library: Download themeplate/process 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/ */

    

themeplate / process example snippets


use ThemePlate\Process\Async;

// Instantiate
$background = new Async( function() {
	long_running_task();
} );

// Dispatch
$background->dispatch();

use ThemePlate\Process\Tasks;

$chores = new Tasks( 'my_day' );

$chores->add( 'first_task', array( 'this', 'that' ) );
$chores->add( function() {
	another_task();
} );