ResponsePlusInterface.php 745 B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. /**
  3. * This file is part of Swow
  4. *
  5. * @link https://github.com/swow/swow
  6. * @contact twosee <twosee@php.net>
  7. *
  8. * For the full copyright and license information,
  9. * please view the LICENSE file that was distributed with this source code
  10. */
  11. declare(strict_types=1);
  12. namespace Swow\Psr7\Message;
  13. use Psr\Http\Message\ResponseInterface;
  14. interface ResponsePlusInterface extends MessagePlusInterface, ResponseInterface
  15. {
  16. public function getStatusCode(): int;
  17. public function getReasonPhrase(): string;
  18. public function setStatus(int $code, string $reasonPhrase = ''): static;
  19. /**
  20. * @param int $code
  21. * @param string $reasonPhrase
  22. */
  23. public function withStatus($code, $reasonPhrase = ''): static;
  24. }