neutron/silex-badfaith-provider

A provider to BadFaith content negociation library

dev-master 2012-12-19 23:40 UTC

This package is auto-updated.

Last update: 2019-12-24 20:08:53 UTC


README

#BadFaith Silex ServiceProvider

BadFaith is a content negociation library you will find here.

Here is the Silex Service Provider :

$app = new Application();
$app->register(new BadFaithServiceProvider());

// optionnal variants
$app['bad-faith.variants'] = array(
    'charset'=> 'UTF-8,iso-8859-1;q=0.9'
);

$app->get('/', function(Application $app) {
    $app['bad-faith']->headerLists['accept_language']->getPreferred();
});
$app->run();

##License

MIT License