PHP code example of ufo-tech / component-transport-contracts

1. Go to this page and download the library: Download ufo-tech/component-transport-contracts 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/ */

    

ufo-tech / component-transport-contracts example snippets


use Ufo\Component\TransportContracts\AsyncStampDTO;
use Ufo\Component\TransportContracts\AsyncTransportFactory;

$factory = new AsyncTransportFactory($resolvers);
$dsn = 'amqp://localhost/%2f/messages';
$resolver = $factory->getTransportResolver($dsn);
$transport = $resolver->getTransport($dsn);
$stamp = $resolver->createAsyncStamp(new AsyncStampDTO($dsn));