AuthorityInterface.php
2 years ago
DataPathInterface.php
2 years ago
DomainHostInterface.php
2 years ago
FragmentInterface.php
2 years ago
HostInterface.php
2 years ago
IpHostInterface.php
2 years ago
PathInterface.php
2 years ago
PortInterface.php
2 years ago
QueryInterface.php
2 years ago
SegmentedPathInterface.php
2 years ago
UriComponentInterface.php
2 years ago
UriException.php
2 years ago
UriInterface.php
2 years ago
UserInfoInterface.php
2 years ago
PathInterface.php
82 lines
| 1 | <?php |
| 2 | |
| 3 | /** |
| 4 | * League.Uri (https://uri.thephpleague.com) |
| 5 | * |
| 6 | * (c) Ignace Nyamagana Butera <nyamsprod@gmail.com> |
| 7 | * |
| 8 | * For the full copyright and license information, please view the LICENSE |
| 9 | * file that was distributed with this source code. |
| 10 | */ |
| 11 | declare (strict_types=1); |
| 12 | namespace IAWPSCOPED\League\Uri\Contracts; |
| 13 | |
| 14 | use IAWPSCOPED\League\Uri\Exceptions\SyntaxError; |
| 15 | /** @internal */ |
| 16 | interface PathInterface extends UriComponentInterface |
| 17 | { |
| 18 | /** |
| 19 | * Returns the decoded path. |
| 20 | */ |
| 21 | public function decoded() : string; |
| 22 | /** |
| 23 | * Returns whether or not the path is absolute or relative. |
| 24 | */ |
| 25 | public function isAbsolute() : bool; |
| 26 | /** |
| 27 | * Returns whether or not the path has a trailing delimiter. |
| 28 | */ |
| 29 | public function hasTrailingSlash() : bool; |
| 30 | /** |
| 31 | * Returns an instance without dot segments. |
| 32 | * |
| 33 | * This method MUST retain the state of the current instance, and return |
| 34 | * an instance that contains the path component normalized by removing |
| 35 | * the dot segment. |
| 36 | * |
| 37 | * @throws SyntaxError for invalid component or transformations |
| 38 | * that would result in a object in invalid state. |
| 39 | */ |
| 40 | public function withoutDotSegments() : self; |
| 41 | /** |
| 42 | * Returns an instance with a leading slash. |
| 43 | * |
| 44 | * This method MUST retain the state of the current instance, and return |
| 45 | * an instance that contains the path component with a leading slash |
| 46 | * |
| 47 | * @throws SyntaxError for invalid component or transformations |
| 48 | * that would result in a object in invalid state. |
| 49 | */ |
| 50 | public function withLeadingSlash() : self; |
| 51 | /** |
| 52 | * Returns an instance without a leading slash. |
| 53 | * |
| 54 | * This method MUST retain the state of the current instance, and return |
| 55 | * an instance that contains the path component without a leading slash |
| 56 | * |
| 57 | * @throws SyntaxError for invalid component or transformations |
| 58 | * that would result in a object in invalid state. |
| 59 | */ |
| 60 | public function withoutLeadingSlash() : self; |
| 61 | /** |
| 62 | * Returns an instance with a trailing slash. |
| 63 | * |
| 64 | * This method MUST retain the state of the current instance, and return |
| 65 | * an instance that contains the path component with a trailing slash |
| 66 | * |
| 67 | * @throws SyntaxError for invalid component or transformations |
| 68 | * that would result in a object in invalid state. |
| 69 | */ |
| 70 | public function withTrailingSlash() : self; |
| 71 | /** |
| 72 | * Returns an instance without a trailing slash. |
| 73 | * |
| 74 | * This method MUST retain the state of the current instance, and return |
| 75 | * an instance that contains the path component without a trailing slash |
| 76 | * |
| 77 | * @throws SyntaxError for invalid component or transformations |
| 78 | * that would result in a object in invalid state. |
| 79 | */ |
| 80 | public function withoutTrailingSlash() : self; |
| 81 | } |
| 82 |