PHP code example of voryx / thruway-subscription-meta

1. Go to this page and download the library: Download voryx/thruway-subscription-meta 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/ */

    

voryx / thruway-subscription-meta example snippets


$router = new Router();
$router->registerModules([
    new RatchetTransportProvider(),
    new SubscriptionMetaModule()
]);

$router->start();

$router = new Router();
$router->registerModules([
    new RatchetTransportProvider()
]);

$realm = $router->getRealmManager()->getRealm('some_realm');
$realm->addModule(new SubscriptionMetaModule());

$router->start();