PHP code example of mcprohosting / flywheel

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

    

mcprohosting / flywheel example snippets


$wheel = Flywheel::make('loadStatus', 3, array(
    0  => function ($name) { echo "Load is A-Okay, $name!"; },
    10 => function ($name) { echo "We're getting some load, $name."; },
    50 => function ($name) { echo "We have so much load, $name!"; }
));

$wheel->spin('Connor');

$wheel = Flywheel::make('loadStatus', 3);
$wheel->addLevel(0, function ($name) { echo "Load is A-Okay, $name!"; });
$wheel->addLevel(10, function ($name) { echo "We're getting some load, $name."; });
$wheel->addLevel(50, function ($name) { echo "We have so much load, $name!"; });

$wheel->spin('Connor');