PHP code example of ryzhov / asterisk-bundle

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

    

ryzhov / asterisk-bundle example snippets


// app/AppKernel.php

public function registerBundles()
{
    $bundles = array(
        new Ryzhov\Bundle\AsteriskBundle(),
    );
}


namespace AppBundle\Service;

use PAMI\Listener\IEventListener;
use PAMI\Message\Event\EventMessage;

class EventHandler implements IEventListener
{
    . . .

    public function handle(EventMessage $event)
    {
        $this->logger->debug(sprintf('class: "%s" handle', get_class($event)));
    }
}