IpHostInterface.php 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <?php
  2. /**
  3. * League.Uri (https://uri.thephpleague.com)
  4. *
  5. * (c) Ignace Nyamagana Butera <nyamsprod@gmail.com>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. declare(strict_types=1);
  11. namespace League\Uri\Contracts;
  12. interface IpHostInterface extends HostInterface
  13. {
  14. /**
  15. * Tells whether the host is an IPv4 address.
  16. */
  17. public function isIpv4(): bool;
  18. /**
  19. * Tells whether the host is an IPv6 address.
  20. */
  21. public function isIpv6(): bool;
  22. /**
  23. * Tells whether the host is an IPv6 address.
  24. */
  25. public function isIpFuture(): bool;
  26. /**
  27. * Tells whether the host has a ZoneIdentifier.
  28. *
  29. * @see http://tools.ietf.org/html/rfc6874#section-4
  30. */
  31. public function hasZoneIdentifier(): bool;
  32. /**
  33. * Returns a host without its zone identifier according to RFC6874.
  34. *
  35. * This method MUST retain the state of the current instance, and return
  36. * an instance without the host zone identifier according to RFC6874
  37. *
  38. * @see http://tools.ietf.org/html/rfc6874#section-4
  39. */
  40. public function withoutZoneIdentifier(): self;
  41. }