PHP code example of bernard / silex

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

    

bernard / silex example snippets

 php


$app = new Silex\Application;
$app->register(new Bernard\Silex\BernardServiceProvider, array(
    'bernard.options' => array(
        'driver' => 'doctrine', // or redis, predis, sqs, iron_mq
        'serializer' => 'symfony', // or jms or simple
    ),
));
 php


$app['bernard.receivers'] = array(
    'ImportUsers' => 'users_worker',
);