Skip to content

Commit b0e1bf7

Browse files
committed
docs: add protocol-relative link to PHPDocs
1 parent c3f646c commit b0e1bf7

2 files changed

Lines changed: 18 additions & 10 deletions

File tree

system/HTTP/SiteURI.php

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -369,8 +369,10 @@ protected function applyParts(array $parts): void
369369
/**
370370
* For base_url() helper.
371371
*
372-
* @param array|string $relativePath URI string or array of URI segments
373-
* @param string|null $scheme URI scheme. E.g., http, ftp
372+
* @param array|string $relativePath URI string or array of URI segments.
373+
* @param string|null $scheme URI scheme. E.g., http, ftp. If empty
374+
* string '' is set, a protocol-relative
375+
* link is returned.
374376
*/
375377
public function baseUrl($relativePath = '', ?string $scheme = null): string
376378
{
@@ -406,9 +408,11 @@ private function stringifyRelativePath($relativePath): string
406408
/**
407409
* For site_url() helper.
408410
*
409-
* @param array|string $relativePath URI string or array of URI segments
410-
* @param string|null $scheme URI scheme. E.g., http, ftp
411-
* @param App|null $config Alternate configuration to use
411+
* @param array|string $relativePath URI string or array of URI segments.
412+
* @param string|null $scheme URI scheme. E.g., http, ftp. If empty
413+
* string '' is set, a protocol-relative
414+
* link is returned.
415+
* @param App|null $config Alternate configuration to use.
412416
*/
413417
public function siteUrl($relativePath = '', ?string $scheme = null, ?App $config = null): string
414418
{

system/Helpers/url_helper.php

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,11 @@
2323
/**
2424
* Returns a site URL as defined by the App config.
2525
*
26-
* @param array|string $relativePath URI string or array of URI segments
27-
* @param string|null $scheme URI scheme. E.g., http, ftp
28-
* @param App|null $config Alternate configuration to use
26+
* @param array|string $relativePath URI string or array of URI segments.
27+
* @param string|null $scheme URI scheme. E.g., http, ftp. If empty
28+
* string '' is set, a protocol-relative
29+
* link is returned.
30+
* @param App|null $config Alternate configuration to use.
2931
*/
3032
function site_url($relativePath = '', ?string $scheme = null, ?App $config = null): string
3133
{
@@ -42,8 +44,10 @@ function site_url($relativePath = '', ?string $scheme = null, ?App $config = nul
4244
* Returns the base URL as defined by the App config.
4345
* Base URLs are trimmed site URLs without the index page.
4446
*
45-
* @param array|string $relativePath URI string or array of URI segments
46-
* @param string|null $scheme URI scheme. E.g., http, ftp
47+
* @param array|string $relativePath URI string or array of URI segments.
48+
* @param string|null $scheme URI scheme. E.g., http, ftp. If empty
49+
* string '' is set, a protocol-relative
50+
* link is returned.
4751
*/
4852
function base_url($relativePath = '', ?string $scheme = null): string
4953
{

0 commit comments

Comments
 (0)