This commit is contained in:
2026-06-05 15:46:29 -04:00
parent daa24de13f
commit c38310faf7
10 changed files with 116 additions and 6 deletions
+2 -2
View File
@@ -1,3 +1,3 @@
# Template
# Uri
Potter Framework Component Template
Potter Framework Uri Interface
+6 -4
View File
@@ -1,14 +1,16 @@
{
"name": "potter/template",
"description": "Potter Framework Component Template",
"name": "potter/uri",
"description": "Potter Framework Uri Template",
"type": "library",
"require": {
"php": "^8.5"
"php": "^8.5",
"psr/http-message": "^2.0",
"potter/stringable": "^0.0.1"
},
"license": "MIT",
"autoload": {
"psr-4": {
"Potter\\": "src/Potter/"
"Potter\\Uri\\": "src/Potter/Uri/"
}
},
"authors": [
+13
View File
@@ -0,0 +1,13 @@
<?php
declare(strict_types=1);
namespace Potter\Uri;
use \Psr\Http\Message\UriInterface as PsrUriInterface;
interface UriFragmentInterface
{
public function getFragment(): string;
public function withFragment(string $fragment): PsrUriInterface;
}
+13
View File
@@ -0,0 +1,13 @@
<?php
declare(strict_types=1);
namespace Potter\Uri;
use \Psr\Http\Message\UriInterface as PsrUriInterface;
interface UriHostInterface
{
public function getHost(): string;
public function withHost(string $host): PsrUriInterface;
}
+17
View File
@@ -0,0 +1,17 @@
<?php
declare(strict_types=1);
namespace Potter\Uri;
use \Psr\Http\Message\UriInterface as PsrUriInterface;
use \Potter\Stringable\StringableInterface;
interface UriInterface extends PsrUriInterface,
UriFragmentInterface, UriHostInterface,
UriPathInterface, UriPortInterface,
UriQueryInterface, UriSchemeInterface,
UriUserInterface, StringableInterface
{
public function getAuthority(): string;
}
+13
View File
@@ -0,0 +1,13 @@
<?php
declare(strict_types=1);
namespace Potter\Uri;
use \Psr\Http\Message\UriInterface as PsrUriInterface;
interface UriPathInterface
{
public function getPath(): string;
public function withPath(string $path): PsrUriInterface;
}
+13
View File
@@ -0,0 +1,13 @@
<?php
declare(strict_types=1);
namespace Potter\Uri;
use \Psr\Http\Message\UriInterface as PsrUriInterface;
interface UriPortInterface
{
public function getPort(): ?int;
public function withPort(?int $port): PsrUriInterface;
}
+13
View File
@@ -0,0 +1,13 @@
<?php
declare(strict_types=1);
namespace Potter\Uri;
use \Psr\Http\Message\UriInterface as PsrUriInterface;
interface UriQueryInterface
{
public function getQuery(): string;
public function withQuery(string $query): PsrUriInterface;
}
+13
View File
@@ -0,0 +1,13 @@
<?php
declare(strict_types=1);
namespace Potter\Uri;
use \Psr\Http\Message\UriInterface as PsrUriInterface;
interface UriSchemeInterface
{
public function getScheme(): string;
public function withScheme(string $scheme): PsrUriInterface;
}
+13
View File
@@ -0,0 +1,13 @@
<?php
declare(strict_types=1);
namespace Potter\Uri;
use \Psr\Http\Message\UriInterface as PsrUriInterface;
interface UriUserInterface
{
public function getUserInfo(): string;
public function withUserInfo(string $user, ?string $password = null): PsrUriInterface;
}