D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
opt
/
psa
/
admin
/
plib
/
modules
/
platform360
/
vendor
/
slim
/
slim
/
Slim
/
Factory
/
Psr17
/
Filename :
NyholmPsr17Factory.php
back
Copy
<?php declare (strict_types=1); namespace Platform360\Slim\Factory\Psr17; use Platform360\Slim\Interfaces\ServerRequestCreatorInterface; class NyholmPsr17Factory extends Psr17Factory { protected static string $responseFactoryClass = 'Platform360\\Nyholm\\Psr7\\Factory\\Psr17Factory'; protected static string $streamFactoryClass = 'Platform360\\Nyholm\\Psr7\\Factory\\Psr17Factory'; protected static string $serverRequestCreatorClass = 'Platform360\\Nyholm\\Psr7Server\\ServerRequestCreator'; protected static string $serverRequestCreatorMethod = 'fromGlobals'; /** * {@inheritdoc} */ public static function getServerRequestCreator() : ServerRequestCreatorInterface { /* * Nyholm Psr17Factory implements all factories in one unified * factory which implements all of the PSR-17 factory interfaces */ $psr17Factory = new static::$responseFactoryClass(); $serverRequestCreator = new static::$serverRequestCreatorClass($psr17Factory, $psr17Factory, $psr17Factory, $psr17Factory); return new ServerRequestCreator($serverRequestCreator, static::$serverRequestCreatorMethod); } }