Skip to content
Branch: master
Go to file
Code

Latest commit

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 

README.md

Bernard bindings for Silex

Build Status

Brings Bernard to Silex.

Getting Started

Add the requirement to your composer.json file and register it with you Application.

{
    "require" : {
        "bernard/silex" :  "~0.4@dev"
    }
}
<?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
    ),
));

After that you have to make a decision about what driver and what kind of Serializer you want to use.

The following serializers are supported:

  • Simple. No dependencies and it is the default.
  • JMS Serializer. Requires a service with id jms_serializer and jms_serializer.builder is present.
  • Symfony Serializer. Requires SerializerServiceProvider is registered before this provider.

The following drivers are supported:

Registering with the ServiceResolver

The ServiceResolver enabled supports service ids. This means they are lazy loaded when they are needed instead of when they are registering.

Register bernard.services with an array of MessageName => ServiceId like so:

<?php

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

Console

If there is a service named console the consume command will be automatically registred. For advanced usecases see the official documentation on Bernard.

About

Bindings for Silex

Resources

License

Contributors 4

  •  
  •  
  •  
  •  

Languages

You can’t perform that action at this time.