mirror of
https://code.mensbeam.com/MensBeam/Arsse.git
synced 2024-12-22 13:12:41 +00:00
Replace ServerRequestFactory
This commit is contained in:
parent
6c0183faea
commit
e588a52e88
1 changed files with 2 additions and 2 deletions
|
@ -11,7 +11,7 @@ use JKingWeb\Arsse\Misc\HTTP;
|
||||||
use Psr\Http\Message\RequestInterface;
|
use Psr\Http\Message\RequestInterface;
|
||||||
use Psr\Http\Message\ServerRequestInterface;
|
use Psr\Http\Message\ServerRequestInterface;
|
||||||
use Psr\Http\Message\ResponseInterface;
|
use Psr\Http\Message\ResponseInterface;
|
||||||
use Laminas\Diactoros\ServerRequestFactory;
|
use GuzzleHttp\Psr7\ServerRequest;
|
||||||
|
|
||||||
class REST {
|
class REST {
|
||||||
public const API_LIST = [
|
public const API_LIST = [
|
||||||
|
@ -84,7 +84,7 @@ class REST {
|
||||||
// ensure the require extensions are loaded
|
// ensure the require extensions are loaded
|
||||||
Arsse::checkExtensions(...Arsse::REQUIRED_EXTENSIONS);
|
Arsse::checkExtensions(...Arsse::REQUIRED_EXTENSIONS);
|
||||||
// create a request object if not provided
|
// create a request object if not provided
|
||||||
$req = $req ?? ServerRequestFactory::fromGlobals();
|
$req = $req ?? ServerRequest::fromGlobals();
|
||||||
// find the API to handle
|
// find the API to handle
|
||||||
[, $target, $class] = $this->apiMatch($req->getRequestTarget(), $this->apis);
|
[, $target, $class] = $this->apiMatch($req->getRequestTarget(), $this->apis);
|
||||||
// authenticate the request pre-emptively
|
// authenticate the request pre-emptively
|
||||||
|
|
Loading…
Reference in a new issue