Skip to content

Commit

Permalink
Rename Link Header string representation method
Browse files Browse the repository at this point in the history
  • Loading branch information
nyamsprod committed Jan 3, 2025
1 parent 69ac036 commit cbcc0b6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/uri/7.0/rfc3986.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ You can also generate the Link `tag` and/or `header` depending on how you want y
$uri = Uri::new('https://example.com/my/css/v1.3');
echo $uri->toLinkTag(['rel' => 'stylesheet']);
//display '<link href="https://example.com/my/css/v1.3" rel="stylesheet">
echo $uri->toLinkFieldValue(['rel' => 'stylesheet']);
echo $uri->toLinkHeaderValue(['rel' => 'stylesheet']);
//display 'https://example.com/my/css/v1.3 ;rel=stylesheet'
```

Expand Down
2 changes: 1 addition & 1 deletion interfaces/Contracts/UriRenderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public function toLinkTag(iterable $attributes = []): string;
*
* @see https://www.rfc-editor.org/rfc/rfc7230.html#section-3.2.6
*/
public function toLinkFieldValue(iterable $parameters = []): string;
public function toLinkHeaderValue(iterable $parameters = []): string;

/**
* Returns the Unix filesystem path. The method returns null for any other scheme except the file scheme.
Expand Down
2 changes: 1 addition & 1 deletion uri/Uri.php
Original file line number Diff line number Diff line change
Expand Up @@ -1159,7 +1159,7 @@ public function toLinkTag(iterable $attributes = []): string
*
* @see https://www.rfc-editor.org/rfc/rfc7230.html#section-3.2.6
*/
public function toLinkFieldValue(iterable $parameters = []): string
public function toLinkHeaderValue(iterable $parameters = []): string
{
$value = '<'.$this->toString().'>';
if (!is_array($parameters)) {
Expand Down

0 comments on commit cbcc0b6

Please sign in to comment.