@@ 354-364 (lines=11) @@ | ||
351 | /** |
|
352 | * {@inheritdoc} |
|
353 | */ |
|
354 | public function withHost($host) |
|
355 | { |
|
356 | if (!is_string($host)) { |
|
357 | throw new \InvalidArgumentException('Invalid host argument'); |
|
358 | } |
|
359 | ||
360 | $uri = clone $this; |
|
361 | $uri->host = $host; |
|
362 | ||
363 | return $uri; |
|
364 | } |
|
365 | ||
366 | /** |
|
367 | * {@inheritdoc} |
|
@@ 388-398 (lines=11) @@ | ||
385 | /** |
|
386 | * {@inheritdoc} |
|
387 | */ |
|
388 | public function withPath($path) |
|
389 | { |
|
390 | if (!is_string($path)) { |
|
391 | throw new \InvalidArgumentException('Invalid path argument'); |
|
392 | } |
|
393 | ||
394 | $uri = clone $this; |
|
395 | $uri->path = $path; |
|
396 | ||
397 | return $uri; |
|
398 | } |
|
399 | ||
400 | /** |
|
401 | * {@inheritdoc} |
|
@@ 418-428 (lines=11) @@ | ||
415 | /** |
|
416 | * {@inheritdoc} |
|
417 | */ |
|
418 | public function withFragment($fragment) |
|
419 | { |
|
420 | if (!is_string($fragment)) { |
|
421 | throw new \InvalidArgumentException('Invalid fragment argument'); |
|
422 | } |
|
423 | ||
424 | $uri = clone $this; |
|
425 | $uri->fragment = $fragment; |
|
426 | ||
427 | return $uri; |
|
428 | } |
|
429 | ||
430 | /** |
|
431 | * {@inheritdoc} |