PHP code example of bizley / mercure-behavior

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

    

bizley / mercure-behavior example snippets


use \bizley\yii2\behaviors\mercure\MercureBehavior;

public function behaviors()
{
    return [
        MercureBehavior::class,
    ];
}

public function behaviors()
{
    return [
        [
            'class' => MercureBehavior::class,
            'publisher' => \bizley\yii2\mercure\Publisher::class,
            'format' => \yii\web\Response::FORMAT_XML
        ]
    ];
}