forked from slimphp/Slim-Http
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbootstrap.php
More file actions
28 lines (21 loc) · 746 Bytes
/
bootstrap.php
File metadata and controls
28 lines (21 loc) · 746 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<?php
/**
* Slim Framework (https://slimframework.com)
*
* @license https://github.com/slimphp/Slim-Http/blob/master/LICENSE.md (MIT License)
*/
declare(strict_types=1);
use AdrianSuter\Autoload\Override\Override;
use Slim\Http\ServerRequest;
$classLoader = require __DIR__ . '/../vendor/autoload.php';
//require __DIR__ . '/Assets/PhpFunctionOverrides.php';
Override::apply($classLoader, [
ServerRequest::class => [
'preg_split' => function (string $pattern, string $subject, int $limit = -1, int $flags = 0) {
if (isset($GLOBALS['preg_split_return'])) {
return $GLOBALS['preg_split_return'];
}
return preg_split($pattern, $subject, $limit, $flags);
}
]
]);