This commit is contained in:
1 parent
f7c532a648
commit
640bd67556
5801 files changed
+484532
-55857
No files matched your search
+17
@@ -26,6 +26,16 @@ class RequestStack
|
||||
*/
|
||||
private array $requests = [];
|
||||
|
||||
/**
|
||||
* @param Request[] $requests
|
||||
*/
|
||||
public function __construct(array $requests = [])
|
||||
{
|
||||
foreach ($requests as $request) {
|
||||
$this->push($request);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Pushes a Request on the stack.
|
||||
*
|
||||
@@ -104,4 +114,11 @@ class RequestStack
|
||||
|
||||
throw new SessionNotFoundException();
|
||||
}
|
||||
|
||||
public function resetRequestFormats(): void
|
||||
{
|
||||
static $resetRequestFormats;
|
||||
$resetRequestFormats ??= \Closure::bind(static fn () => self::$formats = null, null, Request::class);
|
||||
$resetRequestFormats();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user