Routing/Loader/RestYamlCollectionLoader.php 1 location
|
@@ 146-148 (lines=3) @@
|
| 143 |
|
} |
| 144 |
|
|
| 145 |
|
// set format requirement if configured globally |
| 146 |
|
if (!isset($config['requirements']['_format']) && !empty($this->formats)) { |
| 147 |
|
$config['requirements']['_format'] = implode('|', array_keys($this->formats)); |
| 148 |
|
} |
| 149 |
|
} |
| 150 |
|
|
| 151 |
|
// set the default format if configured |
Routing/Loader/Reader/RestActionReader.php 1 location
|
@@ 428-434 (lines=7) @@
|
| 425 |
|
*/ |
| 426 |
|
private function includeFormatIfNeeded(&$path, &$requirements) |
| 427 |
|
{ |
| 428 |
|
if (true === $this->includeFormat) { |
| 429 |
|
$path .= '.{_format}'; |
| 430 |
|
|
| 431 |
|
if (!isset($requirements['_format']) && !empty($this->formats)) { |
| 432 |
|
$requirements['_format'] = implode('|', array_keys($this->formats)); |
| 433 |
|
} |
| 434 |
|
} |
| 435 |
|
} |
| 436 |
|
|
| 437 |
|
/** |