-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy pathIpInterface.php
More file actions
54 lines (45 loc) · 1.68 KB
/
Copy pathIpInterface.php
File metadata and controls
54 lines (45 loc) · 1.68 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<?php
declare(strict_types=1);
namespace Darsyn\IP;
use Darsyn\IP\Contracts\ArithmeticInterface;
use Darsyn\IP\Contracts\ClassificationInterface;
use Darsyn\IP\Contracts\ComparisonInterface;
use Darsyn\IP\Contracts\OutputInterface;
use Darsyn\IP\Contracts\VersionIdentityInterface;
interface IpInterface extends ArithmeticInterface, ClassificationInterface, ComparisonInterface, OutputInterface, VersionIdentityInterface
{
/**
* @throws \Darsyn\IP\Exception\InvalidIpAddressException
* @throws \Darsyn\IP\Exception\WrongVersionException
* @return static
*/
public static function factory(string $ip);
/**
* Whether the IP is an IPv4-mapped IPv6 address, according to
* RFC 4291 § 2.5.5.2 (eg, "::ffff:7f00:1").
*/
public function isMapped(): bool;
/**
* Whether the IP is a 6to4-derived address, according to RFC 3056 § 2. Any
* address within the 6to4 block `2002::/16` (eg, "2002:7f00:1::"), all of
* which embed an IPv4 address in bits 16-47.
*/
public function isDerived(): bool;
/**
* Whether the IP is an IPv4-compatible IPv6 address, according to
* RFC 4291 § 2.5.5.1 (eg, `::7f00:1`); deprecated by that same RFC.
*/
public function isCompatible(): bool;
/**
* Whether the IP is an IPv4-embedded IPv6 address (according to the
* embedding strategy used).
*/
public function isEmbedded(): bool;
/**
* Superseded by `isGloballyReachable()` which conforms to official wording;
* "Public Use" does not appear in the IANA special-purpose registries.
*
* @deprecated Use isGloballyReachable() instead.
*/
public function isPublicUse(): bool;
}