File ManagerCurrent Directory: wp-content/plugins/backwpup/src/Infrastructure/Http/Message/DecoratorLinux appserver-0d5e4f1e-php-cc8da225320a42ba9b7d66cba40b1f03 6.6.123+ #1 SMP PREEMPT_DYNAMIC Wed Mar 11 09:04:28 UTC 2026 x86_64Edit File: FormRequest.php <?php declare(strict_types=1); namespace Inpsyde\BackWPup\Infrastructure\Http\Message\Decorator; use Psr\Http\Message\StreamFactoryInterface; /** * Form params request decorator. * * Sets an array of form parameters on a request as an application/x-www-form-urlencoded request body. */ final class FormRequest extends RequestDecorator { /** * Gets array of form params from the request. * * Request body must be formatted as application/x-www-form-urlencoded. * * @return array<string, mixed> The array of form params */ public function getFormParams(): array { $body = (string) $this->request->getBody(); parse_str($body, $params); return $params; } /** * Turns an array of form parameters into a URL-encoded request body. * * Also sets the Content-Type header to application/x-www-form-url-encoded. * * @param array<string, mixed> $params The form parameters */ public function withFormParams(array $params, StreamFactoryInterface $streamFactory): self { return $this ->withHeader('Content-Type', 'application/x-www-form-urlencoded') ->withBody($streamFactory->createStream(http_build_query($params))) ; } } Upload File Directory Listing NameTypeSizeActions.. (Parent Directory)DirAuthorizationRequest.phpFile2.07 KB Rename | Delete | EditFormRequest.phpFile1.25 KB Rename | Delete | EditJsonRequest.phpFile1.52 KB Rename | Delete | EditRequestDecorator.phpFile5.34 KB Rename | Delete | Edit