PHP code example of mediashare / kernel

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

    

mediashare / kernel example snippets



ediashare\Kernel\Kernel;

$kernel = new Kernel();
$kernel->run();
dump($kernel);


ediashare\Kernel\Kernel;

$kernel = new Kernel();
$kernel->run();

$hello = $kernel->get('Hello');
$hello->setMessage("Hello World\n")
$test = $hello->run();


ediashare\Kernel\Kernel;
use Mediashare\Kernel\Cluster;

$kernel = new Kernel();
$kernel->run();

// Using Cluster
$cluster = new Cluster(); // Create Cluster
$cluster->setModules([
    clone $kernel->get('Hello')->setMessage("[RUN] Git push \n"), // Echo
    clone $kernel->get('Git')->setMessage('CodeReview Cluster'), // Init message for commit
    clone $kernel->get('Hello')->setMessage("[END] Git push \n"), // Echo
]);
$cluster->run();