This commit is contained in:
wangjinlei
2024-12-31 10:28:40 +08:00
parent 145b0ab8a5
commit a54a837670
1179 changed files with 2686 additions and 230376 deletions

View File

@@ -1,5 +1,7 @@
<?php
declare(strict_types=1);
namespace Psr\Http\Message;
/**
@@ -38,7 +40,7 @@ interface UriInterface
* @see https://tools.ietf.org/html/rfc3986#section-3.1
* @return string The URI scheme.
*/
public function getScheme(): string;
public function getScheme();
/**
* Retrieve the authority component of the URI.
@@ -58,7 +60,7 @@ interface UriInterface
* @see https://tools.ietf.org/html/rfc3986#section-3.2
* @return string The URI authority, in "[user-info@]host[:port]" format.
*/
public function getAuthority(): string;
public function getAuthority();
/**
* Retrieve the user information component of the URI.
@@ -75,7 +77,7 @@ interface UriInterface
*
* @return string The URI user information, in "username[:password]" format.
*/
public function getUserInfo(): string;
public function getUserInfo();
/**
* Retrieve the host component of the URI.
@@ -88,7 +90,7 @@ interface UriInterface
* @see http://tools.ietf.org/html/rfc3986#section-3.2.2
* @return string The URI host.
*/
public function getHost(): string;
public function getHost();
/**
* Retrieve the port component of the URI.
@@ -105,7 +107,7 @@ interface UriInterface
*
* @return null|int The URI port.
*/
public function getPort(): ?int;
public function getPort();
/**
* Retrieve the path component of the URI.
@@ -132,7 +134,7 @@ interface UriInterface
* @see https://tools.ietf.org/html/rfc3986#section-3.3
* @return string The URI path.
*/
public function getPath(): string;
public function getPath();
/**
* Retrieve the query string of the URI.
@@ -154,7 +156,7 @@ interface UriInterface
* @see https://tools.ietf.org/html/rfc3986#section-3.4
* @return string The URI query string.
*/
public function getQuery(): string;
public function getQuery();
/**
* Retrieve the fragment component of the URI.
@@ -172,7 +174,7 @@ interface UriInterface
* @see https://tools.ietf.org/html/rfc3986#section-3.5
* @return string The URI fragment.
*/
public function getFragment(): string;
public function getFragment();
/**
* Return an instance with the specified scheme.
@@ -189,7 +191,7 @@ interface UriInterface
* @return static A new instance with the specified scheme.
* @throws \InvalidArgumentException for invalid or unsupported schemes.
*/
public function withScheme(string $scheme): UriInterface;
public function withScheme(string $scheme);
/**
* Return an instance with the specified user information.
@@ -205,7 +207,7 @@ interface UriInterface
* @param null|string $password The password associated with $user.
* @return static A new instance with the specified user information.
*/
public function withUserInfo(string $user, ?string $password = null): UriInterface;
public function withUserInfo(string $user, ?string $password = null);
/**
* Return an instance with the specified host.
@@ -219,7 +221,7 @@ interface UriInterface
* @return static A new instance with the specified host.
* @throws \InvalidArgumentException for invalid hostnames.
*/
public function withHost(string $host): UriInterface;
public function withHost(string $host);
/**
* Return an instance with the specified port.
@@ -238,7 +240,7 @@ interface UriInterface
* @return static A new instance with the specified port.
* @throws \InvalidArgumentException for invalid ports.
*/
public function withPort(?int $port): UriInterface;
public function withPort(?int $port);
/**
* Return an instance with the specified path.
@@ -262,7 +264,7 @@ interface UriInterface
* @return static A new instance with the specified path.
* @throws \InvalidArgumentException for invalid paths.
*/
public function withPath(string $path): UriInterface;
public function withPath(string $path);
/**
* Return an instance with the specified query string.
@@ -279,7 +281,7 @@ interface UriInterface
* @return static A new instance with the specified query string.
* @throws \InvalidArgumentException for invalid query strings.
*/
public function withQuery(string $query): UriInterface;
public function withQuery(string $query);
/**
* Return an instance with the specified URI fragment.
@@ -295,7 +297,7 @@ interface UriInterface
* @param string $fragment The fragment to use with the new instance.
* @return static A new instance with the specified fragment.
*/
public function withFragment(string $fragment): UriInterface;
public function withFragment(string $fragment);
/**
* Return the string representation as a URI reference.
@@ -320,5 +322,5 @@ interface UriInterface
* @see http://tools.ietf.org/html/rfc3986#section-4.1
* @return string
*/
public function __toString(): string;
public function __toString();
}