-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
72 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
<?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 DOMException; | ||
use JsonSerializable; | ||
|
||
interface UriStringProvider 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 normalized string representation of the URI. | ||
* | ||
* @see https://datatracker.ietf.org/doc/html/rfc3986#section-6.2 | ||
*/ | ||
public function toNormalizedString(): ?string; | ||
|
||
/** | ||
* Returns the human-readable string representation of the URI. | ||
* | ||
* @see https://datatracker.ietf.org/doc/html/rfc3986#section-6.2 | ||
*/ | ||
public function toDisplayString(): ?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; | ||
|
||
/** | ||
* Returns the HTML string representation of the anchor tag with the current instance as its href attribute. | ||
* | ||
* @throws DOMException | ||
*/ | ||
public function toAnchorTag(?string $content = null, ?string $class = null, ?string $target = null): string; | ||
|
||
/** | ||
* Returns the markdown string representation of the anchor tag with the current instance as its href attribute. | ||
*/ | ||
public function toMarkdown(?string $content = null): string; | ||
|
||
/** | ||
* Returns the Unix filesystem path. The method returns null for any other scheme. | ||
*/ | ||
public function toUnixPath(): ?string; | ||
|
||
/** | ||
* Returns the Windows filesystem path. The method returns null for any other scheme. | ||
*/ | ||
public function toWindowsPath(): ?string; | ||
} |