Skip to content

Commit b22f03b

Browse files
committed
Added query validator
1 parent 70a1f6d commit b22f03b

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

src/Request.php

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,11 @@ class Request extends PsrRequest implements ServerRequestInterface
7979
*/
8080
private $parsedBody;
8181

82+
/**
83+
* @var array
84+
*/
85+
private $parsedQuery = [];
86+
8287
/**
8388
* @var array
8489
*/
@@ -346,6 +351,27 @@ public function getParsedBody()
346351
return $this->parsedBody;
347352
}
348353

354+
/**
355+
* @return array
356+
*/
357+
public function getParsedQuery(): array
358+
{
359+
return $this->parsedQuery;
360+
}
361+
362+
/**
363+
* @param array $query
364+
*
365+
* @return Request
366+
*/
367+
public function withParsedQuery(array $query)
368+
{
369+
$clone = clone $this;
370+
371+
$clone->parsedQuery = $query;
372+
return $clone;
373+
}
374+
349375
/**
350376
* @param string $key
351377
* @param mixed|null $default

0 commit comments

Comments
 (0)