|
|
@ -2,8 +2,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
namespace Engelsystem\Http;
|
|
|
|
namespace Engelsystem\Http;
|
|
|
|
|
|
|
|
|
|
|
|
use PhpExtended\HttpMessage\UploadedFile;
|
|
|
|
use Nyholm\Psr7\UploadedFile;
|
|
|
|
use PhpExtended\HttpMessage\Uri;
|
|
|
|
use Nyholm\Psr7\Uri;
|
|
|
|
use Psr\Http\Message\ServerRequestInterface;
|
|
|
|
use Psr\Http\Message\ServerRequestInterface;
|
|
|
|
use Psr\Http\Message\UploadedFileInterface;
|
|
|
|
use Psr\Http\Message\UploadedFileInterface;
|
|
|
|
use Psr\Http\Message\UriInterface;
|
|
|
|
use Psr\Http\Message\UriInterface;
|
|
|
@ -207,7 +207,7 @@ class Request extends SymfonyRequest implements ServerRequestInterface
|
|
|
|
{
|
|
|
|
{
|
|
|
|
$uri = parent::getUri();
|
|
|
|
$uri = parent::getUri();
|
|
|
|
|
|
|
|
|
|
|
|
return Uri::parseFromString($uri);
|
|
|
|
return new Uri($uri);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
@ -332,11 +332,11 @@ class Request extends SymfonyRequest implements ServerRequestInterface
|
|
|
|
/** @var SymfonyFile $file */
|
|
|
|
/** @var SymfonyFile $file */
|
|
|
|
|
|
|
|
|
|
|
|
$files[] = new UploadedFile(
|
|
|
|
$files[] = new UploadedFile(
|
|
|
|
$file->getClientOriginalName(),
|
|
|
|
|
|
|
|
$file->getRealPath(),
|
|
|
|
$file->getRealPath(),
|
|
|
|
$file->getMimeType(),
|
|
|
|
|
|
|
|
$file->getSize(),
|
|
|
|
$file->getSize(),
|
|
|
|
$file->getError()
|
|
|
|
$file->getError(),
|
|
|
|
|
|
|
|
$file->getClientOriginalName(),
|
|
|
|
|
|
|
|
$file->getMimeType()
|
|
|
|
);
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -464,10 +464,10 @@ class Request extends SymfonyRequest implements ServerRequestInterface
|
|
|
|
* This method obviates the need for a hasAttribute() method, as it allows
|
|
|
|
* This method obviates the need for a hasAttribute() method, as it allows
|
|
|
|
* specifying a default value to return if the attribute is not found.
|
|
|
|
* specifying a default value to return if the attribute is not found.
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* @see getAttributes()
|
|
|
|
|
|
|
|
* @param string $name The attribute name.
|
|
|
|
* @param string $name The attribute name.
|
|
|
|
* @param mixed $default Default value to return if the attribute does not exist.
|
|
|
|
* @param mixed $default Default value to return if the attribute does not exist.
|
|
|
|
* @return mixed
|
|
|
|
* @return mixed
|
|
|
|
|
|
|
|
* @see getAttributes()
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
public function getAttribute($name, $default = null)
|
|
|
|
public function getAttribute($name, $default = null)
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -484,10 +484,10 @@ class Request extends SymfonyRequest implements ServerRequestInterface
|
|
|
|
* immutability of the message, and MUST return an instance that has the
|
|
|
|
* immutability of the message, and MUST return an instance that has the
|
|
|
|
* updated attribute.
|
|
|
|
* updated attribute.
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* @see getAttributes()
|
|
|
|
|
|
|
|
* @param string $name The attribute name.
|
|
|
|
* @param string $name The attribute name.
|
|
|
|
* @param mixed $value The value of the attribute.
|
|
|
|
* @param mixed $value The value of the attribute.
|
|
|
|
* @return static
|
|
|
|
* @return static
|
|
|
|
|
|
|
|
* @see getAttributes()
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
public function withAttribute($name, $value)
|
|
|
|
public function withAttribute($name, $value)
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -509,9 +509,9 @@ class Request extends SymfonyRequest implements ServerRequestInterface
|
|
|
|
* immutability of the message, and MUST return an instance that removes
|
|
|
|
* immutability of the message, and MUST return an instance that removes
|
|
|
|
* the attribute.
|
|
|
|
* the attribute.
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* @see getAttributes()
|
|
|
|
|
|
|
|
* @param string $name The attribute name.
|
|
|
|
* @param string $name The attribute name.
|
|
|
|
* @return static
|
|
|
|
* @return static
|
|
|
|
|
|
|
|
* @see getAttributes()
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
public function withoutAttribute($name)
|
|
|
|
public function withoutAttribute($name)
|
|
|
|
{
|
|
|
|
{
|
|
|
|