summaryrefslogtreecommitdiff
path: root/vendor/league/uri-interfaces/src/Contracts
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/league/uri-interfaces/src/Contracts')
-rw-r--r--vendor/league/uri-interfaces/src/Contracts/AuthorityInterface.php87
-rw-r--r--vendor/league/uri-interfaces/src/Contracts/DataPathInterface.php92
-rw-r--r--vendor/league/uri-interfaces/src/Contracts/DomainHostInterface.php107
-rw-r--r--vendor/league/uri-interfaces/src/Contracts/FragmentInterface.php22
-rw-r--r--vendor/league/uri-interfaces/src/Contracts/HostInterface.php51
-rw-r--r--vendor/league/uri-interfaces/src/Contracts/IpHostInterface.php48
-rw-r--r--vendor/league/uri-interfaces/src/Contracts/PathInterface.php90
-rw-r--r--vendor/league/uri-interfaces/src/Contracts/PortInterface.php22
-rw-r--r--vendor/league/uri-interfaces/src/Contracts/QueryInterface.php227
-rw-r--r--vendor/league/uri-interfaces/src/Contracts/SegmentedPathInterface.php147
-rw-r--r--vendor/league/uri-interfaces/src/Contracts/UriComponentInterface.php88
-rw-r--r--vendor/league/uri-interfaces/src/Contracts/UriException.php20
-rw-r--r--vendor/league/uri-interfaces/src/Contracts/UriInterface.php292
-rw-r--r--vendor/league/uri-interfaces/src/Contracts/UserInfoInterface.php40
14 files changed, 1333 insertions, 0 deletions
diff --git a/vendor/league/uri-interfaces/src/Contracts/AuthorityInterface.php b/vendor/league/uri-interfaces/src/Contracts/AuthorityInterface.php
new file mode 100644
index 0000000..ed6c2b8
--- /dev/null
+++ b/vendor/league/uri-interfaces/src/Contracts/AuthorityInterface.php
@@ -0,0 +1,87 @@
+<?php
+
+/**
+ * League.Uri (https://uri.thephpleague.com)
+ *
+ * (c) Ignace Nyamagana Butera <[email protected]>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+declare(strict_types=1);
+
+namespace League\Uri\Contracts;
+
+use League\Uri\Exceptions\IdnSupportMissing;
+use League\Uri\Exceptions\SyntaxError;
+
+interface AuthorityInterface extends UriComponentInterface
+{
+ /**
+ * Returns the host component of the authority.
+ */
+ public function getHost(): ?string;
+
+ /**
+ * Returns the port component of the authority.
+ */
+ public function getPort(): ?int;
+
+ /**
+ * Returns the user information component of the authority.
+ */
+ public function getUserInfo(): ?string;
+
+ /**
+ * Return an instance with the specified host.
+ *
+ * This method MUST retain the state of the current instance, and return
+ * an instance that contains the specified host.
+ *
+ * A null value provided for the host is equivalent to removing the host
+ * information.
+ *
+ * @param ?string $host
+ * @throws SyntaxError for invalid component or transformations
+ * that would result in a object in invalid state.
+ * @throws IdnSupportMissing for component or transformations
+ * requiring IDN support when IDN support is not present
+ * or misconfigured.
+ */
+ public function withHost(?string $host): self;
+
+ /**
+ * Return an instance with the specified port.
+ *
+ * This method MUST retain the state of the current instance, and return
+ * an instance that contains the specified port.
+ *
+ * A null value provided for the port is equivalent to removing the port
+ * information.
+ *
+ * @param ?int $port
+ *
+ * @throws SyntaxError for invalid component or transformations
+ * that would result in a object in invalid state.
+ */
+ public function withPort(?int $port): self;
+
+ /**
+ * Return an instance with the specified user information.
+ *
+ * This method MUST retain the state of the current instance, and return
+ * an instance that contains the specified user information.
+ *
+ * Password is optional, but the user information MUST include the
+ * user; a null value for the user is equivalent to removing user
+ * information.
+ *
+ * @param ?string $user
+ * @param ?string $password
+ *
+ * @throws SyntaxError for invalid component or transformations
+ * that would result in a object in invalid state.
+ */
+ public function withUserInfo(?string $user, ?string $password = null): self;
+}
diff --git a/vendor/league/uri-interfaces/src/Contracts/DataPathInterface.php b/vendor/league/uri-interfaces/src/Contracts/DataPathInterface.php
new file mode 100644
index 0000000..1e4f385
--- /dev/null
+++ b/vendor/league/uri-interfaces/src/Contracts/DataPathInterface.php
@@ -0,0 +1,92 @@
+<?php
+
+/**
+ * League.Uri (https://uri.thephpleague.com)
+ *
+ * (c) Ignace Nyamagana Butera <[email protected]>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+declare(strict_types=1);
+
+namespace League\Uri\Contracts;
+
+interface DataPathInterface extends PathInterface
+{
+ /**
+ * Retrieve the data mime type associated to the URI.
+ *
+ * If no mimetype is present, this method MUST return the default mimetype 'text/plain'.
+ *
+ * @see http://tools.ietf.org/html/rfc2397#section-2
+ */
+ public function getMimeType(): string;
+
+ /**
+ * Retrieve the parameters associated with the Mime Type of the URI.
+ *
+ * If no parameters is present, this method MUST return the default parameter 'charset=US-ASCII'.
+ *
+ * @see http://tools.ietf.org/html/rfc2397#section-2
+ */
+ public function getParameters(): string;
+
+ /**
+ * Retrieve the mediatype associated with the URI.
+ *
+ * If no mediatype is present, this method MUST return the default parameter 'text/plain;charset=US-ASCII'.
+ *
+ * @see http://tools.ietf.org/html/rfc2397#section-3
+ *
+ * @return string The URI scheme.
+ */
+ public function getMediaType(): string;
+
+ /**
+ * Retrieves the data string.
+ *
+ * Retrieves the data part of the path. If no data part is provided return
+ * a empty string
+ */
+ public function getData(): string;
+
+ /**
+ * Tells whether the data is binary safe encoded.
+ */
+ public function isBinaryData(): bool;
+
+ /**
+ * Save the data to a specific file.
+ */
+ public function save(string $path, string $mode = 'w'): \SplFileObject;
+
+ /**
+ * Returns an instance where the data part is base64 encoded.
+ *
+ * This method MUST retain the state of the current instance, and return
+ * an instance where the data part is base64 encoded
+ */
+ public function toBinary(): self;
+
+ /**
+ * Returns an instance where the data part is url encoded following RFC3986 rules.
+ *
+ * This method MUST retain the state of the current instance, and return
+ * an instance where the data part is url encoded
+ */
+ public function toAscii(): self;
+
+ /**
+ * Return an instance with the specified mediatype parameters.
+ *
+ * This method MUST retain the state of the current instance, and return
+ * an instance that contains the specified mediatype parameters.
+ *
+ * Users must provide encoded characters.
+ *
+ * An empty parameters value is equivalent to removing the parameter.
+ */
+ public function withParameters(string $parameters): self;
+}
diff --git a/vendor/league/uri-interfaces/src/Contracts/DomainHostInterface.php b/vendor/league/uri-interfaces/src/Contracts/DomainHostInterface.php
new file mode 100644
index 0000000..2490310
--- /dev/null
+++ b/vendor/league/uri-interfaces/src/Contracts/DomainHostInterface.php
@@ -0,0 +1,107 @@
+<?php
+
+/**
+ * League.Uri (https://uri.thephpleague.com)
+ *
+ * (c) Ignace Nyamagana Butera <[email protected]>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+declare(strict_types=1);
+
+namespace League\Uri\Contracts;
+
+use League\Uri\Exceptions\SyntaxError;
+
+/**
+ * @extends \IteratorAggregate<string>
+ */
+interface DomainHostInterface extends \Countable, HostInterface, \IteratorAggregate
+{
+ /**
+ * Returns the labels total number.
+ */
+ public function count(): int;
+
+ /**
+ * Iterate over the Domain labels.
+ *
+ * @return \Iterator<string>
+ */
+ public function getIterator(): \Iterator;
+
+ /**
+ * Retrieves a single host label.
+ *
+ * If the label offset has not been set, returns the null value.
+ */
+ public function get(int $offset): ?string;
+
+ /**
+ * Returns the associated key for a specific label or all the keys.
+ *
+ * @param ?string $label
+ *
+ * @return int[]
+ */
+ public function keys(?string $label = null): array;
+
+ /**
+ * Tells whether the domain is absolute.
+ */
+ public function isAbsolute(): bool;
+
+ /**
+ * Prepends a label to the host.
+ */
+ public function prepend(string $label): self;
+
+ /**
+ * Appends a label to the host.
+ */
+ public function append(string $label): self;
+
+ /**
+ * Returns an instance with its Root label.
+ *
+ * @see https://tools.ietf.org/html/rfc3986#section-3.2.2
+ */
+ public function withRootLabel(): self;
+
+ /**
+ * Returns an instance without its Root label.
+ *
+ * @see https://tools.ietf.org/html/rfc3986#section-3.2.2
+ */
+ public function withoutRootLabel(): self;
+
+ /**
+ * Returns an instance with the modified label.
+ *
+ * This method MUST retain the state of the current instance, and return
+ * an instance that contains the new label
+ *
+ * If $key is non-negative, the added label will be the label at $key position from the start.
+ * If $key is negative, the added label will be the label at $key position from the end.
+ *
+ * @throws SyntaxError If the key is invalid
+ */
+ public function withLabel(int $key, string $label): self;
+
+ /**
+ * Returns an instance without the specified label.
+ *
+ * This method MUST retain the state of the current instance, and return
+ * an instance that contains the modified component
+ *
+ * If $key is non-negative, the removed label will be the label at $key position from the start.
+ * If $key is negative, the removed label will be the label at $key position from the end.
+ *
+ * @param int ...$keys
+ *
+ * @throws SyntaxError If the key is invalid
+ */
+ public function withoutLabel(int ...$keys): self;
+}
diff --git a/vendor/league/uri-interfaces/src/Contracts/FragmentInterface.php b/vendor/league/uri-interfaces/src/Contracts/FragmentInterface.php
new file mode 100644
index 0000000..3d80f06
--- /dev/null
+++ b/vendor/league/uri-interfaces/src/Contracts/FragmentInterface.php
@@ -0,0 +1,22 @@
+<?php
+
+/**
+ * League.Uri (https://uri.thephpleague.com)
+ *
+ * (c) Ignace Nyamagana Butera <[email protected]>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+declare(strict_types=1);
+
+namespace League\Uri\Contracts;
+
+interface FragmentInterface extends UriComponentInterface
+{
+ /**
+ * Returns the decoded fragment.
+ */
+ public function decoded(): ?string;
+}
diff --git a/vendor/league/uri-interfaces/src/Contracts/HostInterface.php b/vendor/league/uri-interfaces/src/Contracts/HostInterface.php
new file mode 100644
index 0000000..a8b8bb3
--- /dev/null
+++ b/vendor/league/uri-interfaces/src/Contracts/HostInterface.php
@@ -0,0 +1,51 @@
+<?php
+
+/**
+ * League.Uri (https://uri.thephpleague.com)
+ *
+ * (c) Ignace Nyamagana Butera <[email protected]>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+declare(strict_types=1);
+
+namespace League\Uri\Contracts;
+
+interface HostInterface extends UriComponentInterface
+{
+ /**
+ * Returns the ascii representation.
+ */
+ public function toAscii(): ?string;
+
+ /**
+ * Returns the unicode representation.
+ */
+ public function toUnicode(): ?string;
+
+ /**
+ * Returns the IP version.
+ *
+ * If the host is a not an IP this method will return null
+ */
+ public function getIpVersion(): ?string;
+
+ /**
+ * Returns the IP component If the Host is an IP address.
+ *
+ * If the host is a not an IP this method will return null
+ */
+ public function getIp(): ?string;
+
+ /**
+ * Tells whether the host is a domain name.
+ */
+ public function isDomain(): bool;
+
+ /**
+ * Tells whether the host is an IP Address.
+ */
+ public function isIp(): bool;
+}
diff --git a/vendor/league/uri-interfaces/src/Contracts/IpHostInterface.php b/vendor/league/uri-interfaces/src/Contracts/IpHostInterface.php
new file mode 100644
index 0000000..1e2242a
--- /dev/null
+++ b/vendor/league/uri-interfaces/src/Contracts/IpHostInterface.php
@@ -0,0 +1,48 @@
+<?php
+
+/**
+ * League.Uri (https://uri.thephpleague.com)
+ *
+ * (c) Ignace Nyamagana Butera <[email protected]>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+declare(strict_types=1);
+
+namespace League\Uri\Contracts;
+
+interface IpHostInterface extends HostInterface
+{
+ /**
+ * Returns whether or not the host is an IPv4 address.
+ */
+ public function isIpv4(): bool;
+ /**
+ * Returns whether or not the host is an IPv6 address.
+ */
+ public function isIpv6(): bool;
+
+ /**
+ * Returns whether or not the host is an IPv6 address.
+ */
+ public function isIpFuture(): bool;
+
+ /**
+ * Returns whether or not the host has a ZoneIdentifier.
+ *
+ * @see http://tools.ietf.org/html/rfc6874#section-4
+ */
+ public function hasZoneIdentifier(): bool;
+
+ /**
+ * Returns an host without its zone identifier according to RFC6874.
+ *
+ * This method MUST retain the state of the current instance, and return
+ * an instance without the host zone identifier according to RFC6874
+ *
+ * @see http://tools.ietf.org/html/rfc6874#section-4
+ */
+ public function withoutZoneIdentifier(): self;
+}
diff --git a/vendor/league/uri-interfaces/src/Contracts/PathInterface.php b/vendor/league/uri-interfaces/src/Contracts/PathInterface.php
new file mode 100644
index 0000000..389c0ff
--- /dev/null
+++ b/vendor/league/uri-interfaces/src/Contracts/PathInterface.php
@@ -0,0 +1,90 @@
+<?php
+
+/**
+ * League.Uri (https://uri.thephpleague.com)
+ *
+ * (c) Ignace Nyamagana Butera <[email protected]>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+declare(strict_types=1);
+
+namespace League\Uri\Contracts;
+
+use League\Uri\Exceptions\SyntaxError;
+
+interface PathInterface extends UriComponentInterface
+{
+ /**
+ * Returns the decoded path.
+ */
+ public function decoded(): string;
+
+ /**
+ * Returns whether or not the path is absolute or relative.
+ */
+ public function isAbsolute(): bool;
+
+ /**
+ * Returns whether or not the path has a trailing delimiter.
+ */
+ public function hasTrailingSlash(): bool;
+
+ /**
+ * Returns an instance without dot segments.
+ *
+ * This method MUST retain the state of the current instance, and return
+ * an instance that contains the path component normalized by removing
+ * the dot segment.
+ *
+ * @throws SyntaxError for invalid component or transformations
+ * that would result in a object in invalid state.
+ */
+ public function withoutDotSegments(): self;
+
+ /**
+ * Returns an instance with a leading slash.
+ *
+ * This method MUST retain the state of the current instance, and return
+ * an instance that contains the path component with a leading slash
+ *
+ * @throws SyntaxError for invalid component or transformations
+ * that would result in a object in invalid state.
+ */
+ public function withLeadingSlash(): self;
+
+ /**
+ * Returns an instance without a leading slash.
+ *
+ * This method MUST retain the state of the current instance, and return
+ * an instance that contains the path component without a leading slash
+ *
+ * @throws SyntaxError for invalid component or transformations
+ * that would result in a object in invalid state.
+ */
+ public function withoutLeadingSlash(): self;
+
+ /**
+ * Returns an instance with a trailing slash.
+ *
+ * This method MUST retain the state of the current instance, and return
+ * an instance that contains the path component with a trailing slash
+ *
+ * @throws SyntaxError for invalid component or transformations
+ * that would result in a object in invalid state.
+ */
+ public function withTrailingSlash(): self;
+
+ /**
+ * Returns an instance without a trailing slash.
+ *
+ * This method MUST retain the state of the current instance, and return
+ * an instance that contains the path component without a trailing slash
+ *
+ * @throws SyntaxError for invalid component or transformations
+ * that would result in a object in invalid state.
+ */
+ public function withoutTrailingSlash(): self;
+}
diff --git a/vendor/league/uri-interfaces/src/Contracts/PortInterface.php b/vendor/league/uri-interfaces/src/Contracts/PortInterface.php
new file mode 100644
index 0000000..7230c4a
--- /dev/null
+++ b/vendor/league/uri-interfaces/src/Contracts/PortInterface.php
@@ -0,0 +1,22 @@
+<?php
+
+/**
+ * League.Uri (https://uri.thephpleague.com)
+ *
+ * (c) Ignace Nyamagana Butera <[email protected]>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+declare(strict_types=1);
+
+namespace League\Uri\Contracts;
+
+interface PortInterface extends UriComponentInterface
+{
+ /**
+ * Returns the integer representation of the Port.
+ */
+ public function toInt(): ?int;
+}
diff --git a/vendor/league/uri-interfaces/src/Contracts/QueryInterface.php b/vendor/league/uri-interfaces/src/Contracts/QueryInterface.php
new file mode 100644
index 0000000..f7081ea
--- /dev/null
+++ b/vendor/league/uri-interfaces/src/Contracts/QueryInterface.php
@@ -0,0 +1,227 @@
+<?php
+
+/**
+ * League.Uri (https://uri.thephpleague.com)
+ *
+ * (c) Ignace Nyamagana Butera <[email protected]>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+declare(strict_types=1);
+
+namespace League\Uri\Contracts;
+
+/**
+ * @extends \IteratorAggregate<array{0:string, 1:string|null}>
+ */
+interface QueryInterface extends \Countable, \IteratorAggregate, UriComponentInterface
+{
+ /**
+ * Returns the query separator.
+ */
+ public function getSeparator(): string;
+
+ /**
+ * Returns the number of key/value pairs present in the object.
+ */
+ public function count(): int;
+
+ /**
+ * Returns an iterator allowing to go through all key/value pairs contained in this object.
+ *
+ * The pair is represented as an array where the first value is the pair key
+ * and the second value the pair value.
+ *
+ * The key of each pair is a string
+ * The value of each pair is a scalar or the null value
+ *
+ * @return \Iterator<int, array{0:string, 1:string|null}>
+ */
+ public function getIterator(): \Iterator;
+
+ /**
+ * Returns an iterator allowing to go through all key/value pairs contained in this object.
+ *
+ * The return type is as a Iterator where its offset is the pair key and its value the pair value.
+ *
+ * The key of each pair is a string
+ * The value of each pair is a scalar or the null value
+ *
+ * @return iterable<string, string|null>
+ */
+ public function pairs(): iterable;
+
+ /**
+ * Tells whether a pair with a specific name exists.
+ *
+ * @see https://url.spec.whatwg.org/#dom-urlsearchparams-has
+ */
+ public function has(string $key): bool;
+
+ /**
+ * Returns the first value associated to the given pair name.
+ *
+ * If no value is found null is returned
+ *
+ * @see https://url.spec.whatwg.org/#dom-urlsearchparams-get
+ */
+ public function get(string $key): ?string;
+
+ /**
+ * Returns all the values associated to the given pair name as an array or all
+ * the instance pairs.
+ *
+ * If no value is found an empty array is returned
+ *
+ * @see https://url.spec.whatwg.org/#dom-urlsearchparams-getall
+ *
+ * @return array<int, string|null>
+ */
+ public function getAll(string $key): array;
+
+ /**
+ * Returns the store PHP variables as elements of an array.
+ *
+ * The result is similar as PHP parse_str when used with its
+ * second argument with the difference that variable names are
+ * not mangled.
+ *
+ * If a key is submitted it will returns the value attached to it or null
+ *
+ * @see http://php.net/parse_str
+ * @see https://wiki.php.net/rfc/on_demand_name_mangling
+ *
+ * @param ?string $key
+ * @return mixed the collection of stored PHP variables or the empty array if no input is given,
+ * the single value of a stored PHP variable or null if the variable is not present in the collection
+ */
+ public function params(?string $key = null);
+
+ /**
+ * Returns the RFC1738 encoded query.
+ */
+ public function toRFC1738(): ?string;
+
+ /**
+ * Returns the RFC3986 encoded query.
+ *
+ * @see ::getContent
+ */
+ public function toRFC3986(): ?string;
+
+ /**
+ * Returns an instance with a different separator.
+ *
+ * This method MUST retain the state of the current instance, and return
+ * an instance that contains the query component with a different separator
+ */
+ public function withSeparator(string $separator): self;
+
+ /**
+ * Sorts the query string by offset, maintaining offset to data correlations.
+ *
+ * This method MUST retain the state of the current instance, and return
+ * an instance that contains the modified query
+ *
+ * @see https://url.spec.whatwg.org/#dom-urlsearchparams-sort
+ */
+ public function sort(): self;
+
+ /**
+ * Returns an instance without duplicate key/value pair.
+ *
+ * This method MUST retain the state of the current instance, and return
+ * an instance that contains the query component normalized by removing
+ * duplicate pairs whose key/value are the same.
+ */
+ public function withoutDuplicates(): self;
+
+ /**
+ * Returns an instance without empty key/value where the value is the null value.
+ *
+ * This method MUST retain the state of the current instance, and return
+ * an instance that contains the query component normalized by removing
+ * empty pairs.
+ *
+ * A pair is considered empty if its value is equal to the null value
+ */
+ public function withoutEmptyPairs(): self;
+
+ /**
+ * Returns an instance where numeric indices associated to PHP's array like key are removed.
+ *
+ * This method MUST retain the state of the current instance, and return
+ * an instance that contains the query component normalized so that numeric indexes
+ * are removed from the pair key value.
+ *
+ * ie.: toto[3]=bar[3]&foo=bar becomes toto[]=bar[3]&foo=bar
+ */
+ public function withoutNumericIndices(): self;
+
+ /**
+ * Returns an instance with the a new key/value pair added to it.
+ *
+ * This method MUST retain the state of the current instance, and return
+ * an instance that contains the modified query
+ *
+ * If the pair already exists the value will replace the existing value.
+ *
+ * @see https://url.spec.whatwg.org/#dom-urlsearchparams-set
+ *
+ * @param ?string $value
+ */
+ public function withPair(string $key, ?string $value): self;
+
+ /**
+ * Returns an instance with the new pairs set to it.
+ *
+ * This method MUST retain the state of the current instance, and return
+ * an instance that contains the modified query
+ *
+ * @see ::withPair
+ */
+ public function merge(string $query): self;
+
+ /**
+ * Returns an instance without the specified keys.
+ *
+ * This method MUST retain the state of the current instance, and return
+ * an instance that contains the modified component
+ *
+ * @param string ...$keys
+ */
+ public function withoutPair(string ...$keys): self;
+
+ /**
+ * Returns a new instance with a specified key/value pair appended as a new pair.
+ *
+ * This method MUST retain the state of the current instance, and return
+ * an instance that contains the modified query
+ *
+ * @param ?string $value
+ */
+ public function appendTo(string $key, ?string $value): self;
+
+ /**
+ * Returns an instance with the new pairs appended to it.
+ *
+ * This method MUST retain the state of the current instance, and return
+ * an instance that contains the modified query
+ *
+ * If the pair already exists the value will be added to it.
+ */
+ public function append(string $query): self;
+
+ /**
+ * Returns an instance without the specified params.
+ *
+ * This method MUST retain the state of the current instance, and return
+ * an instance that contains the modified component without PHP's value.
+ * PHP's mangled is not taken into account.
+ *
+ * @param string ...$keys
+ */
+ public function withoutParam(string ...$keys): self;
+}
diff --git a/vendor/league/uri-interfaces/src/Contracts/SegmentedPathInterface.php b/vendor/league/uri-interfaces/src/Contracts/SegmentedPathInterface.php
new file mode 100644
index 0000000..53065ff
--- /dev/null
+++ b/vendor/league/uri-interfaces/src/Contracts/SegmentedPathInterface.php
@@ -0,0 +1,147 @@
+<?php
+
+/**
+ * League.Uri (https://uri.thephpleague.com)
+ *
+ * (c) Ignace Nyamagana Butera <[email protected]>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+declare(strict_types=1);
+
+namespace League\Uri\Contracts;
+
+use League\Uri\Exceptions\SyntaxError;
+
+/**
+ * @extends \IteratorAggregate<string>
+ */
+interface SegmentedPathInterface extends \Countable, \IteratorAggregate, PathInterface
+{
+ /**
+ * Returns the total number of segments in the path.
+ */
+ public function count(): int;
+
+ /**
+ * Iterate over the path segment.
+ *
+ * @return \Iterator<string>
+ */
+ public function getIterator(): \Iterator;
+
+ /**
+ * Returns parent directory's path.
+ */
+ public function getDirname(): string;
+
+ /**
+ * Returns the path basename.
+ */
+ public function getBasename(): string;
+
+ /**
+ * Returns the basename extension.
+ */
+ public function getExtension(): string;
+
+ /**
+ * Retrieves a single path segment.
+ *
+ * If the segment offset has not been set, returns null.
+ */
+ public function get(int $offset): ?string;
+
+ /**
+ * Returns the associated key for a specific segment.
+ *
+ * If a value is specified only the keys associated with
+ * the given value will be returned
+ *
+ * @param ?string $segment
+ *
+ * @return int[]
+ */
+ public function keys(?string $segment = null): array;
+
+ /**
+ * Appends a segment to the path.
+ */
+ public function append(string $segment): self;
+
+ /**
+ * Prepends a segment to the path.
+ */
+ public function prepend(string $segment): self;
+
+ /**
+ * Returns an instance with the modified segment.
+ *
+ * This method MUST retain the state of the current instance, and return
+ * an instance that contains the new segment
+ *
+ * If $key is non-negative, the added segment will be the segment at $key position from the start.
+ * If $key is negative, the added segment will be the segment at $key position from the end.
+ *
+ * @param ?string $segment
+ *
+ * @throws SyntaxError If the key is invalid
+ */
+ public function withSegment(int $key, ?string $segment): self;
+
+ /**
+ * Returns an instance without the specified segment.
+ *
+ * This method MUST retain the state of the current instance, and return
+ * an instance that contains the modified component
+ *
+ * If $key is non-negative, the removed segment will be the segment at $key position from the start.
+ * If $key is negative, the removed segment will be the segment at $key position from the end.
+ *
+ * @param int ...$keys remaining keys to remove
+ *
+ * @throws SyntaxError If the key is invalid
+ */
+ public function withoutSegment(int ...$keys): self;
+
+ /**
+ * Returns an instance without duplicate delimiters.
+ *
+ * This method MUST retain the state of the current instance, and return
+ * an instance that contains the path component normalized by removing
+ * multiple consecutive empty segment
+ */
+ public function withoutEmptySegments(): self;
+
+ /**
+ * Returns an instance with the specified parent directory's path.
+ *
+ * This method MUST retain the state of the current instance, and return
+ * an instance that contains the extension basename modified.
+ *
+ * @param ?string $path
+ */
+ public function withDirname(?string $path): self;
+
+ /**
+ * Returns an instance with the specified basename.
+ *
+ * This method MUST retain the state of the current instance, and return
+ * an instance that contains the extension basename modified.
+ *
+ * @param ?string $basename
+ */
+ public function withBasename(?string $basename): self;
+
+ /**
+ * Returns an instance with the specified basename extension.
+ *
+ * This method MUST retain the state of the current instance, and return
+ * an instance that contains the extension basename modified.
+ *
+ * @param ?string $extension
+ */
+ public function withExtension(?string $extension): self;
+}
diff --git a/vendor/league/uri-interfaces/src/Contracts/UriComponentInterface.php b/vendor/league/uri-interfaces/src/Contracts/UriComponentInterface.php
new file mode 100644
index 0000000..c7b39bb
--- /dev/null
+++ b/vendor/league/uri-interfaces/src/Contracts/UriComponentInterface.php
@@ -0,0 +1,88 @@
+<?php
+
+/**
+ * League.Uri (https://uri.thephpleague.com)
+ *
+ * (c) Ignace Nyamagana Butera <[email protected]>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+declare(strict_types=1);
+
+namespace League\Uri\Contracts;
+
+use League\Uri\Exceptions\IdnSupportMissing;
+use League\Uri\Exceptions\SyntaxError;
+
+interface UriComponentInterface extends \JsonSerializable
+{
+ /**
+ * Returns the instance content.
+ *
+ * If the instance is defined, the value returned MUST be encoded according to the
+ * selected encoding algorithm. In any case, the value MUST NOT double-encode any character
+ * depending on the selected encoding algorithm.
+ *
+ * To determine what characters to encode, please refer to RFC 3986, Sections 2 and 3.
+ * or RFC 3987 Section 3. By default the content is encoded according to RFC3986
+ *
+ * If the instance is not defined null is returned
+ */
+ public function getContent(): ?string;
+
+ /**
+ * Returns the instance string representation.
+ *
+ * If the instance is defined, the value returned MUST be percent-encoded,
+ * but MUST NOT double-encode any characters. To determine what characters
+ * to encode, please refer to RFC 3986, Sections 2 and 3.
+ *
+ * If the instance is not defined an empty string is returned
+ */
+ public function __toString(): string;
+
+ /**
+ * Returns the instance json representation.
+ *
+ * If the instance is defined, the value returned MUST be percent-encoded,
+ * but MUST NOT double-encode any characters. To determine what characters
+ * to encode, please refer to RFC 3986 or RFC 1738.
+ *
+ * If the instance is not defined null is returned
+ */
+ public function jsonSerialize(): ?string;
+
+ /**
+ * Returns the instance string representation with its optional URI delimiters.
+ *
+ * The value returned MUST be percent-encoded, but MUST NOT double-encode any
+ * characters. To determine what characters to encode, please refer to RFC 3986,
+ * Sections 2 and 3.
+ *
+ * If the instance is not defined an empty string is returned
+ */
+ public function getUriComponent(): string;
+
+ /**
+ * Returns an instance with the specified content.
+ *
+ * This method MUST retain the state of the current instance, and return
+ * an instance that contains the specified content.
+ *
+ * Users can provide both encoded and decoded content characters.
+ *
+ * A null value is equivalent to removing the component content.
+ *
+ *
+ * @param ?string $content
+ *
+ * @throws SyntaxError for invalid component or transformations
+ * that would result in a object in invalid state.
+ * @throws IdnSupportMissing for component or transformations
+ * requiring IDN support when IDN support is not present
+ * or misconfigured.
+ */
+ public function withContent(?string $content): self;
+}
diff --git a/vendor/league/uri-interfaces/src/Contracts/UriException.php b/vendor/league/uri-interfaces/src/Contracts/UriException.php
new file mode 100644
index 0000000..c0fec2a
--- /dev/null
+++ b/vendor/league/uri-interfaces/src/Contracts/UriException.php
@@ -0,0 +1,20 @@
+<?php
+
+/**
+ * League.Uri (https://uri.thephpleague.com)
+ *
+ * (c) Ignace Nyamagana Butera <[email protected]>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+declare(strict_types=1);
+
+namespace League\Uri\Contracts;
+
+use Throwable;
+
+interface UriException extends Throwable
+{
+}
diff --git a/vendor/league/uri-interfaces/src/Contracts/UriInterface.php b/vendor/league/uri-interfaces/src/Contracts/UriInterface.php
new file mode 100644
index 0000000..b6eb6a1
--- /dev/null
+++ b/vendor/league/uri-interfaces/src/Contracts/UriInterface.php
@@ -0,0 +1,292 @@
+<?php
+
+/**
+ * League.Uri (https://uri.thephpleague.com)
+ *
+ * (c) Ignace Nyamagana Butera <[email protected]>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+declare(strict_types=1);
+
+namespace League\Uri\Contracts;
+
+use League\Uri\Exceptions\IdnSupportMissing;
+use League\Uri\Exceptions\SyntaxError;
+
+interface UriInterface extends \JsonSerializable
+{
+ /**
+ * Returns the string representation as a URI reference.
+ *
+ * @see http://tools.ietf.org/html/rfc3986#section-4.1
+ */
+ public function __toString(): string;
+
+ /**
+ * Returns the string representation as a URI reference.
+ *
+ * @see http://tools.ietf.org/html/rfc3986#section-4.1
+ * @see ::__toString
+ */
+ public function jsonSerialize(): string;
+
+ /**
+ * Retrieve the scheme component of the URI.
+ *
+ * If no scheme is present, this method MUST return a null value.
+ *
+ * The value returned MUST be normalized to lowercase, per RFC 3986
+ * Section 3.1.
+ *
+ * The trailing ":" character is not part of the scheme and MUST NOT be
+ * added.
+ *
+ * @see https://tools.ietf.org/html/rfc3986#section-3.1
+ */
+ public function getScheme(): ?string;
+
+ /**
+ * Retrieve the authority component of the URI.
+ *
+ * If no scheme is present, this method MUST return a null value.
+ *
+ * If the port component is not set or is the standard port for the current
+ * scheme, it SHOULD NOT be included.
+ *
+ * @see https://tools.ietf.org/html/rfc3986#section-3.2
+ */
+ public function getAuthority(): ?string;
+
+ /**
+ * Retrieve the user information component of the URI.
+ *
+ * If no scheme is present, this method MUST return a null value.
+ *
+ * If a user is present in the URI, this will return that value;
+ * additionally, if the password is also present, it will be appended to the
+ * user value, with a colon (":") separating the values.
+ *
+ * The trailing "@" character is not part of the user information and MUST
+ * NOT be added.
+ */
+ public function getUserInfo(): ?string;
+
+ /**
+ * Retrieve the host component of the URI.
+ *
+ * If no host is present this method MUST return a null value.
+ *
+ * The value returned MUST be normalized to lowercase, per RFC 3986
+ * Section 3.2.2.
+ *
+ * @see http://tools.ietf.org/html/rfc3986#section-3.2.2
+ */
+ public function getHost(): ?string;
+
+ /**
+ * Retrieve the port component of the URI.
+ *
+ * If a port is present, and it is non-standard for the current scheme,
+ * this method MUST return it as an integer. If the port is the standard port
+ * used with the current scheme, this method SHOULD return null.
+ *
+ * If no port is present, and no scheme is present, this method MUST return
+ * a null value.
+ *
+ * If no port is present, but a scheme is present, this method MAY return
+ * the standard port for that scheme, but SHOULD return null.
+ */
+ public function getPort(): ?int;
+
+ /**
+ * Retrieve the path component of the URI.
+ *
+ * The path can either be empty or absolute (starting with a slash) or
+ * rootless (not starting with a slash). Implementations MUST support all
+ * three syntaxes.
+ *
+ * Normally, the empty path "" and absolute path "/" are considered equal as
+ * defined in RFC 7230 Section 2.7.3. But this method MUST NOT automatically
+ * do this normalization because in contexts with a trimmed base path, e.g.
+ * the front controller, this difference becomes significant. It's the task
+ * of the user to handle both "" and "/".
+ *
+ * The value returned MUST be percent-encoded, but MUST NOT double-encode
+ * any characters. To determine what characters to encode, please refer to
+ * RFC 3986, Sections 2 and 3.3.
+ *
+ * As an example, if the value should include a slash ("/") not intended as
+ * delimiter between path segments, that value MUST be passed in encoded
+ * form (e.g., "%2F") to the instance.
+ *
+ * @see https://tools.ietf.org/html/rfc3986#section-2
+ * @see https://tools.ietf.org/html/rfc3986#section-3.3
+ */
+ public function getPath(): string;
+
+ /**
+ * Retrieve the query string of the URI.
+ *
+ * If no host is present this method MUST return a null value.
+ *
+ * The leading "?" character is not part of the query and MUST NOT be
+ * added.
+ *
+ * The value returned MUST be percent-encoded, but MUST NOT double-encode
+ * any characters. To determine what characters to encode, please refer to
+ * RFC 3986, Sections 2 and 3.4.
+ *
+ * As an example, if a value in a key/value pair of the query string should
+ * include an ampersand ("&") not intended as a delimiter between values,
+ * that value MUST be passed in encoded form (e.g., "%26") to the instance.
+ *
+ * @see https://tools.ietf.org/html/rfc3986#section-2
+ * @see https://tools.ietf.org/html/rfc3986#section-3.4
+ */
+ public function getQuery(): ?string;
+
+ /**
+ * Retrieve the fragment component of the URI.
+ *
+ * If no host is present this method MUST return a null value.
+ *
+ * The leading "#" character is not part of the fragment and MUST NOT be
+ * added.
+ *
+ * The value returned MUST be percent-encoded, but MUST NOT double-encode
+ * any characters. To determine what characters to encode, please refer to
+ * RFC 3986, Sections 2 and 3.5.
+ *
+ * @see https://tools.ietf.org/html/rfc3986#section-2
+ * @see https://tools.ietf.org/html/rfc3986#section-3.5
+ */
+ public function getFragment(): ?string;
+
+ /**
+ * Return an instance with the specified scheme.
+ *
+ * This method MUST retain the state of the current instance, and return
+ * an instance that contains the specified scheme.
+ *
+ * A null value provided for the scheme is equivalent to removing the scheme
+ * information.
+ *
+ * @param ?string $scheme
+ *
+ * @throws SyntaxError for invalid component or transformations
+ * that would result in a object in invalid state.
+ */
+ public function withScheme(?string $scheme): self;
+
+ /**
+ * Return an instance with the specified user information.
+ *
+ * This method MUST retain the state of the current instance, and return
+ * an instance that contains the specified user information.
+ *
+ * Password is optional, but the user information MUST include the
+ * user; a null value for the user is equivalent to removing user
+ * information.
+ *
+ * @param ?string $user
+ * @param ?string $password
+ *
+ * @throws SyntaxError for invalid component or transformations
+ * that would result in a object in invalid state.
+ */
+ public function withUserInfo(?string $user, ?string $password = null): self;
+
+ /**
+ * Return an instance with the specified host.
+ *
+ * This method MUST retain the state of the current instance, and return
+ * an instance that contains the specified host.
+ *
+ * A null value provided for the host is equivalent to removing the host
+ * information.
+ *
+ * @param ?string $host
+ *
+ * @throws SyntaxError for invalid component or transformations
+ * that would result in a object in invalid state.
+ * @throws IdnSupportMissing for component or transformations
+ * requiring IDN support when IDN support is not present
+ * or misconfigured.
+ */
+ public function withHost(?string $host): self;
+
+ /**
+ * Return an instance with the specified port.
+ *
+ * This method MUST retain the state of the current instance, and return
+ * an instance that contains the specified port.
+ *
+ * A null value provided for the port is equivalent to removing the port
+ * information.
+ *
+ * @param ?int $port
+ *
+ * @throws SyntaxError for invalid component or transformations
+ * that would result in a object in invalid state.
+ */
+ public function withPort(?int $port): self;
+
+ /**
+ * Return an instance with the specified path.
+ *
+ * This method MUST retain the state of the current instance, and return
+ * an instance that contains the specified path.
+ *
+ * The path can either be empty or absolute (starting with a slash) or
+ * rootless (not starting with a slash). Implementations MUST support all
+ * three syntaxes.
+ *
+ * Users can provide both encoded and decoded path characters.
+ * Implementations ensure the correct encoding as outlined in getPath().
+ *
+ * @throws SyntaxError for invalid component or transformations
+ * that would result in a object in invalid state.
+ */
+ public function withPath(string $path): self;
+
+ /**
+ * Return an instance with the specified query string.
+ *
+ * This method MUST retain the state of the current instance, and return
+ * an instance that contains the specified query string.
+ *
+ * Users can provide both encoded and decoded query characters.
+ * Implementations ensure the correct encoding as outlined in getQuery().
+ *
+ * A null value provided for the query is equivalent to removing the query
+ * information.
+ *
+ * @param ?string $query
+ *
+ * @throws SyntaxError for invalid component or transformations
+ * that would result in a object in invalid state.
+ */
+ public function withQuery(?string $query): self;
+
+ /**
+ * Return an instance with the specified URI fragment.
+ *
+ * This method MUST retain the state of the current instance, and return
+ * an instance that contains the specified URI fragment.
+ *
+ * Users can provide both encoded and decoded fragment characters.
+ * Implementations ensure the correct encoding as outlined in getFragment().
+ *
+ * A null value provided for the fragment is equivalent to removing the fragment
+ * information.
+ *
+ * @param ?string $fragment
+ *
+ * @throws SyntaxError for invalid component or transformations
+ * that would result in a object in invalid state.
+ */
+ public function withFragment(?string $fragment): self;
+}
diff --git a/vendor/league/uri-interfaces/src/Contracts/UserInfoInterface.php b/vendor/league/uri-interfaces/src/Contracts/UserInfoInterface.php
new file mode 100644
index 0000000..6411f9b
--- /dev/null
+++ b/vendor/league/uri-interfaces/src/Contracts/UserInfoInterface.php
@@ -0,0 +1,40 @@
+<?php
+
+/**
+ * League.Uri (https://uri.thephpleague.com)
+ *
+ * (c) Ignace Nyamagana Butera <[email protected]>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+declare(strict_types=1);
+
+namespace League\Uri\Contracts;
+
+interface UserInfoInterface extends UriComponentInterface
+{
+ /**
+ * Returns the user component part.
+ */
+ public function getUser(): ?string;
+
+ /**
+ * Returns the pass component part.
+ */
+ public function getPass(): ?string;
+
+ /**
+ * Returns an instance with the specified user and/or pass.
+ *
+ * This method MUST retain the state of the current instance, and return
+ * an instance that contains the specified user.
+ *
+ * An empty user is equivalent to removing the user information.
+ *
+ * @param ?string $user
+ * @param ?string $pass
+ */
+ public function withUserInfo(?string $user, ?string $pass = null): self;
+}