Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

16 lines (11 sloc) 0.37 kb
<?php
namespace Pff\ServiceProvider\AcceptHeaderServiceProvider;
use Silex\Route as SilexRoute;
class Route extends SilexRoute
{
public function accept($content_types)
{
$content_regexps = array_map(function($item) { return preg_quote($item, '/'); }, $content_types);
$this->setRequirement('_accept', implode('|', $content_regexps));
}
}
Jump to Line
Something went wrong with that request. Please try again.