forked from jeremykendall/php-domain-parser
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathResolvedDomainName.php
More file actions
59 lines (50 loc) · 1.79 KB
/
Copy pathResolvedDomainName.php
File metadata and controls
59 lines (50 loc) · 1.79 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
55
56
57
58
59
<?php
declare(strict_types=1);
namespace Pdp;
interface ResolvedDomainName extends Host, DomainNameProvider
{
/**
* Returns the domain effective tld component.
*/
public function suffix(): EffectiveTopLevelDomain;
/**
* Returns the second level domain component.
*/
public function secondLevelDomain(): DomainName;
/**
* Returns the registrable domain component.
*/
public function registrableDomain(): DomainName;
/**
* Returns the sub domain component.
*/
public function subDomain(): DomainName;
/**
* Returns an instance with the specified sub domain added.
*
* This method MUST retain the state of the current instance, and return
* an instance that contains the new sub domain
*
* @throws CannotProcessHost If the Sub domain can not be added to the current Domain
*/
public function withSubDomain(DomainName $subDomain): self;
/**
* Returns an instance with the specified second level domain label added.
*
* This method MUST retain the state of the current instance, and return
* an instance that contains the second level domain label
*
* @throws CannotProcessHost If the second level domain label can not be added
*/
public function withSecondLevelDomain(DomainName $label): self;
/**
* Returns an instance with the specified public suffix added.
*
* This method MUST retain the state of the current instance, and return
* an instance that contains the new public suffix
*
* If the domain already has a public suffix it will be replaced by the new value
* otherwise the public suffix content is added to or remove from the current domain.
*/
public function withSuffix(EffectiveTopLevelDomain $suffix): self;
}