Skip to content

docs: improve url_helper.rst #9171

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 7, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions user_guide_src/source/helpers/url_helper.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ The following functions are available:
.. php:function:: site_url([$uri = ''[, $protocol = null[, $altConfig = null]]])

:param array|string $uri: URI string or array of URI segments.
:param string $protocol: Protocol, e.g., 'http' or 'https'. If empty string '' is set, a protocol-relative link is returned.
:param string $protocol: Protocol, e.g., ``'http'`` or ``'https'``. If empty string ``''`` is set, a protocol-relative link is returned.
:param \\Config\\App $altConfig: Alternate configuration to use.
:returns: Site URL
:rtype: string
Expand Down Expand Up @@ -57,7 +57,7 @@ The following functions are available:
.. php:function:: base_url([$uri = ''[, $protocol = null]])

:param array|string $uri: URI string or array of URI segments.
:param string $protocol: Protocol, e.g., 'http' or 'https'. If empty string '' is set, a protocol-relative link is returned.
:param string $protocol: Protocol, e.g., ``'http'`` or ``'https'``. If empty string ``''`` is set, a protocol-relative link is returned.
:returns: Base URL
:rtype: string

Expand Down Expand Up @@ -124,7 +124,7 @@ The following functions are available:

:param boolean $returnObject: True if you would like a URI instance returned instead of a string.
:returns: The URL the user was previously on
:rtype: string|mixed|\\CodeIgniter\\HTTP\\URI
:rtype: string|\\CodeIgniter\\HTTP\\URI

Returns the full URL (including segments) of the page the user was previously on.

Expand Down Expand Up @@ -182,10 +182,10 @@ The following functions are available:

.. php:function:: anchor([$uri = ''[, $title = ''[, $attributes = ''[, $altConfig = null]]]])

:param mixed $uri: URI string or array of URI segments
:param string $title: Anchor title
:param mixed $attributes: HTML attributes
:param \\Config\\App $altConfig: Alternate configuration to use
:param array|string $uri: URI string or array of URI segments
:param string $title: Anchor title
:param array|object|string $attributes: HTML attributes
:param \\Config\\App|null $altConfig: Alternate configuration to use
:returns: HTML hyperlink (anchor tag)
:rtype: string

Expand Down Expand Up @@ -222,7 +222,7 @@ The following functions are available:

:param string $uri: URI string
:param string $title: Anchor title
:param mixed $attributes: HTML attributes
:param array|false|object|string $attributes: HTML attributes
:param \\Config\\App $altConfig: Alternate configuration to use
:returns: Pop-up hyperlink
:rtype: string
Expand Down Expand Up @@ -262,7 +262,7 @@ The following functions are available:

:param string $email: E-mail address
:param string $title: Anchor title
:param mixed $attributes: HTML attributes
:param array|object|string $attributes: HTML attributes
:returns: A "mail to" hyperlink
:rtype: string

Expand All @@ -281,7 +281,7 @@ The following functions are available:

:param string $email: E-mail address
:param string $title: Anchor title
:param mixed $attributes: HTML attributes
:param array|object|string $attributes: HTML attributes
:returns: A spam-safe "mail to" hyperlink
:rtype: string

Expand All @@ -292,7 +292,7 @@ The following functions are available:
.. php:function:: auto_link($str[, $type = 'both'[, $popup = false]])

:param string $str: Input string
:param string $type: Link type ('email', 'url' or 'both')
:param string $type: Link type (``'email'``, ``'url'`` or ``'both'``)
:param bool $popup: Whether to create popup links
:returns: Linkified string
:rtype: string
Expand Down Expand Up @@ -378,7 +378,7 @@ The following functions are available:
.. php:function:: url_to($controller[, ...$args])

:param string $controller: Route name or Controller::method
:param mixed ...$args: One or more parameters to be passed to the route. The last parameter allows you to set the locale.
:param int|string ...$args: One or more parameters to be passed to the route. The last parameter allows you to set the locale.
:returns: Absolute URL
:rtype: string

Expand Down