public withRequestTarget ( mixed $requestTarget ) : self | ||
$requestTarget | mixed | |
Résultat | self |
public function withRequestTarget($requestTarget)
{
if (preg_match('#\\s#', $requestTarget)) {
throw new InvalidArgumentException('Invalid request target provided; cannot contain whitespace');
}
$new = clone $this;
$new->requestTarget = $requestTarget;
return $new;
}