PHP code example of bckp / roadrunner

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

    

bckp / roadrunner example snippets


public static function bootRR(string $appDir): Configurator
{
    $configurator = new Configurator;

	$configurator->setTimeZone('Europe/Prague');
	$configurator->setTempDirectory($appDir . '/temp');

	$configurator->createRobotLoader()
		->addDirectory(__DIR__)
		->register();

	$configurator->addConfig($appDir . '/config/common.neon');
	$configurator->addConfig($appDir . '/config/services.neon');
	$configurator->addConfig($appDir . '/config/local.neon');
	$configurator->addConfig($appDir . '/config/roadrunner.neon');

	return $configurator;
}


declare(strict_types=1);

use Bckp\RoadRunner\RoadRunner;
use App\Bootstrap;

define('ROOT_DIR', dirname(__DIR__));
r::class)
		 ->run();
shell
#!/usr/bin/env sh
exec php /app-path/app/roadrunner.php 2>&3