AuthorityInterface.php
3 years ago
DataPathInterface.php
3 years ago
DomainHostInterface.php
3 years ago
FragmentInterface.php
3 years ago
HostInterface.php
3 years ago
IpHostInterface.php
3 years ago
PathInterface.php
3 years ago
PortInterface.php
3 years ago
QueryInterface.php
3 years ago
SegmentedPathInterface.php
3 years ago
UriComponentInterface.php
3 years ago
UriException.php
3 years ago
UriInterface.php
3 years ago
UserInfoInterface.php
3 years ago
PathInterface.php
81 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 IAWP\League\Uri\Contracts; |
| 13 | |
| 14 | use IAWP\League\Uri\Exceptions\SyntaxError; |
| 15 | interface PathInterface extends UriComponentInterface |
| 16 | { |
| 17 | /** |
| 18 | * Returns the decoded path. |
| 19 | */ |
| 20 | public function decoded() : string; |
| 21 | /** |
| 22 | * Returns whether or not the path is absolute or relative. |
| 23 | */ |
| 24 | public function isAbsolute() : bool; |
| 25 | /** |
| 26 | * Returns whether or not the path has a trailing delimiter. |
| 27 | */ |
| 28 | public function hasTrailingSlash() : bool; |
| 29 | /** |
| 30 | * Returns an instance without dot segments. |
| 31 | * |
| 32 | * This method MUST retain the state of the current instance, and return |
| 33 | * an instance that contains the path component normalized by removing |
| 34 | * the dot segment. |
| 35 | * |
| 36 | * @throws SyntaxError for invalid component or transformations |
| 37 | * that would result in a object in invalid state. |
| 38 | */ |
| 39 | public function withoutDotSegments() : self; |
| 40 | /** |
| 41 | * Returns an instance with a leading slash. |
| 42 | * |
| 43 | * This method MUST retain the state of the current instance, and return |
| 44 | * an instance that contains the path component with a leading slash |
| 45 | * |
| 46 | * @throws SyntaxError for invalid component or transformations |
| 47 | * that would result in a object in invalid state. |
| 48 | */ |
| 49 | public function withLeadingSlash() : self; |
| 50 | /** |
| 51 | * Returns an instance without a leading slash. |
| 52 | * |
| 53 | * This method MUST retain the state of the current instance, and return |
| 54 | * an instance that contains the path component without a leading slash |
| 55 | * |
| 56 | * @throws SyntaxError for invalid component or transformations |
| 57 | * that would result in a object in invalid state. |
| 58 | */ |
| 59 | public function withoutLeadingSlash() : self; |
| 60 | /** |
| 61 | * Returns an instance with a trailing slash. |
| 62 | * |
| 63 | * This method MUST retain the state of the current instance, and return |
| 64 | * an instance that contains the path component with a trailing slash |
| 65 | * |
| 66 | * @throws SyntaxError for invalid component or transformations |
| 67 | * that would result in a object in invalid state. |
| 68 | */ |
| 69 | public function withTrailingSlash() : self; |
| 70 | /** |
| 71 | * Returns an instance without a trailing slash. |
| 72 | * |
| 73 | * This method MUST retain the state of the current instance, and return |
| 74 | * an instance that contains the path component without a trailing slash |
| 75 | * |
| 76 | * @throws SyntaxError for invalid component or transformations |
| 77 | * that would result in a object in invalid state. |
| 78 | */ |
| 79 | public function withoutTrailingSlash() : self; |
| 80 | } |
| 81 |