Mercurial > hg > isophonics-drupal-site
comparison vendor/symfony/http-foundation/Request.php @ 16:c2387f117808
Routine composer update
author | Chris Cannam |
---|---|
date | Tue, 10 Jul 2018 15:07:59 +0100 |
parents | 1fec387a4317 |
children | 129ea1e6d783 |
comparison
equal
deleted
inserted
replaced
15:e200cb7efeb3 | 16:c2387f117808 |
---|---|
639 * @param array $hostPatterns A list of trusted host patterns | 639 * @param array $hostPatterns A list of trusted host patterns |
640 */ | 640 */ |
641 public static function setTrustedHosts(array $hostPatterns) | 641 public static function setTrustedHosts(array $hostPatterns) |
642 { | 642 { |
643 self::$trustedHostPatterns = array_map(function ($hostPattern) { | 643 self::$trustedHostPatterns = array_map(function ($hostPattern) { |
644 return sprintf('#%s#i', $hostPattern); | 644 return sprintf('{%s}i', $hostPattern); |
645 }, $hostPatterns); | 645 }, $hostPatterns); |
646 // we need to reset trusted hosts on trusted host patterns change | 646 // we need to reset trusted hosts on trusted host patterns change |
647 self::$trustedHosts = array(); | 647 self::$trustedHosts = array(); |
648 } | 648 } |
649 | 649 |
1376 /** | 1376 /** |
1377 * Gets the mime type associated with the format. | 1377 * Gets the mime type associated with the format. |
1378 * | 1378 * |
1379 * @param string $format The format | 1379 * @param string $format The format |
1380 * | 1380 * |
1381 * @return string The associated mime type (null if not found) | 1381 * @return string|null The associated mime type (null if not found) |
1382 */ | 1382 */ |
1383 public function getMimeType($format) | 1383 public function getMimeType($format) |
1384 { | 1384 { |
1385 if (null === static::$formats) { | 1385 if (null === static::$formats) { |
1386 static::initializeFormats(); | 1386 static::initializeFormats(); |