neutron/silex-badfaith-provider

A provider to BadFaith content negociation library

Installs: 4 441

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

pkg:composer/neutron/silex-badfaith-provider

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