Giter VIP home page Giter VIP logo

silex's Introduction

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.

silex's People

Contributors

henrikbjorn avatar gromnan avatar toin0u avatar pda avatar

Stargazers

Pavlina Drosos avatar James avatar André Vitor Cuba de Miranda avatar Sebastiaan Hilbers avatar Nicolas Béhier-Dévigne avatar  avatar Prasetyo avatar Sérgio R Siqueira avatar Si Nguyen avatar Cristian Pascottini avatar Marcos Sader avatar Sean Huber avatar Jimmy Leger avatar  avatar

Watchers

 avatar James Cloos avatar  avatar

silex's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.