PHP code example of peridot-php / peridot-yo-plugin

1. Go to this page and download the library: Download peridot-php/peridot-yo-plugin 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/ */

    

peridot-php / peridot-yo-plugin example snippets



use Evenement\EventEmitterInterface;
use Peridot\Plugin\Yo\YoPlugin;

return function (EventEmitterInterface $emitter) {
    /**
     * Register by passing the peridot event emitter,
     * a yo api token obtained from http://dev.justyo.co/,
     * an an array of users to be Yo'ed,
     * and an optional string or function that returns a link string
     */
    $plugin = YoPlugin::register($emitter, "your-yo-token", ['USER1', 'USER2'], 'http://linktobuild.com');
};


use Evenement\EventEmitterInterface;
use Peridot\Plugin\Yo\YoPlugin;

return function (EventEmitterInterface $emitter) {
    $plugin = YoPlugin::register($emitter, "your-yo-token", ['USER1', 'USER2'], 'http://linktobuild.com');
    $plugin->setBehavior(YoPlugin::BEHAVIOR_ON_PASS);
};

$ composer