PluginProbe
Defender Security – Malware Scanner, Login Security & Firewall / 6.3.0
Defender Security – Malware Scanner, Login Security & Firewall v6.3.0
6.3.0 6.2.3 6.2.4 6.2.0 6.2.1 6.2.2 6.1.0 5.3.1 5.4.0 5.4.1 5.5.0 5.5.1 5.6.0 5.6.1 5.6.2 5.7.0 5.7.1 5.7.2 5.8.0 5.8.1 5.9.0 6.0.0 6.0.1 3.0.1 3.1.0 All 141 releases
defender-security / lib / packages / League / Uri / Contracts / DomainHostInterface.php

DomainHostInterface.php in Defender Security – Malware Scanner, Login Security & Firewall 6.3.0, at lib/packages/League/Uri/Contracts/DomainHostInterface.php

108 lines 2.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 /**
4 * League.Uri (https://uri.thephpleague.com)
5 *
6 * (c) Ignace Nyamagana Butera <[email protected]>
7 *
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
10 */
11
12 declare(strict_types=1);
13
14 namespace WP_DEFENDER_VENDOR\League\Uri\Contracts;
15
16 use WP_DEFENDER_VENDOR\League\Uri\Exceptions\SyntaxError;
17
18 /**
19 * @extends \IteratorAggregate<string>
20 */
21 interface DomainHostInterface extends \Countable, HostInterface, \IteratorAggregate
22 {
23 /**
24 * Returns the labels total number.
25 */
26 public function count(): int;
27
28 /**
29 * Iterate over the Domain labels.
30 *
31 * @return \Iterator<string>
32 */
33 public function getIterator(): \Iterator;
34
35 /**
36 * Retrieves a single host label.
37 *
38 * If the label offset has not been set, returns the null value.
39 */
40 public function get(int $offset): ?string;
41
42 /**
43 * Returns the associated key for a specific label or all the keys.
44 *
45 * @param ?string $label
46 *
47 * @return int[]
48 */
49 public function keys(?string $label = null): array;
50
51 /**
52 * Tells whether the domain is absolute.
53 */
54 public function isAbsolute(): bool;
55
56 /**
57 * Prepends a label to the host.
58 */
59 public function prepend(string $label): self;
60
61 /**
62 * Appends a label to the host.
63 */
64 public function append(string $label): self;
65
66 /**
67 * Returns an instance with its Root label.
68 *
69 * @see https://tools.ietf.org/html/rfc3986#section-3.2.2
70 */
71 public function withRootLabel(): self;
72
73 /**
74 * Returns an instance without its Root label.
75 *
76 * @see https://tools.ietf.org/html/rfc3986#section-3.2.2
77 */
78 public function withoutRootLabel(): self;
79
80 /**
81 * Returns an instance with the modified label.
82 *
83 * This method MUST retain the state of the current instance, and return
84 * an instance that contains the new label
85 *
86 * If $key is non-negative, the added label will be the label at $key position from the start.
87 * If $key is negative, the added label will be the label at $key position from the end.
88 *
89 * @throws SyntaxError If the key is invalid
90 */
91 public function withLabel(int $key, string $label): self;
92
93 /**
94 * Returns an instance without the specified label.
95 *
96 * This method MUST retain the state of the current instance, and return
97 * an instance that contains the modified component
98 *
99 * If $key is non-negative, the removed label will be the label at $key position from the start.
100 * If $key is negative, the removed label will be the label at $key position from the end.
101 *
102 * @param int ...$keys
103 *
104 * @throws SyntaxError If the key is invalid
105 */
106 public function withoutLabel(int ...$keys): self;
107 }
108