Skip to content
Merged
Show file tree
Hide file tree
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
5 changes: 4 additions & 1 deletion system/HTTP/ResponseTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,7 @@ public function redirect(string $uri, string $method = 'auto', ?int $code = null
* @param string $expire Cookie expiration time in seconds
* @param string $domain Cookie domain (e.g.: '.yourdomain.com')
* @param string $path Cookie path (default: '/')
* @param string $prefix Cookie name prefix
* @param string $prefix Cookie name prefix ('': the default prefix)
* @param bool $secure Whether to only transfer cookies via SSL
* @param bool $httponly Whether only make the cookie accessible via HTTP (no javascript)
* @param string|null $samesite
Expand Down Expand Up @@ -618,6 +618,9 @@ public function hasCookie(string $name, ?string $value = null, string $prefix =
/**
* Returns the cookie
*
* @param string $prefix Cookie prefix.
* '': the default prefix
*
* @return Cookie|Cookie[]|null
*/
public function getCookie(?string $name = null, string $prefix = '')
Expand Down
2 changes: 1 addition & 1 deletion system/Helpers/cookie_helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
* @param string $expire The number of seconds until expiration
* @param string $domain For site-wide cookie. Usually: .yourdomain.com
* @param string $path The cookie path
* @param string $prefix The cookie prefix
* @param string $prefix The cookie prefix ('': the default prefix)
* @param bool $secure True makes the cookie secure
* @param bool $httpOnly True makes the cookie accessible via http(s) only (no javascript)
* @param string|null $sameSite The cookie SameSite value
Expand Down
2 changes: 1 addition & 1 deletion user_guide_src/source/helpers/cookie_helper.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ The following functions are available:
:param int $expire: Number of seconds until expiration
:param string $domain: Cookie domain (usually: .yourdomain.com)
:param string $path: Cookie path
:param string $prefix: Cookie name prefix
:param string $prefix: Cookie name prefix. If ``''``, the default from **app/Config/Cookie.php** is used
:param bool $secure: Whether to only send the cookie through HTTPS
:param bool $httpOnly: Whether to hide the cookie from JavaScript
:param string $sameSite: The value for the SameSite cookie parameter. If ``null``, the default from **app/Config/Cookie.php** is used
Expand Down
2 changes: 1 addition & 1 deletion user_guide_src/source/libraries/cookies/002.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
use CodeIgniter\Cookie\Cookie;
use Config\Cookie as CookieConfig;

// pass in an Config\Cookie instance before constructing a Cookie class
// pass in a Config\Cookie instance before constructing a Cookie class
Cookie::setDefaults(new CookieConfig());
$cookie = new Cookie('login_token');

Expand Down
2 changes: 1 addition & 1 deletion user_guide_src/source/outgoing/response.rst
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ The methods provided by the parent class that are available are:
:param int $expire: Cookie expiration time in seconds
:param string $domain: Cookie domain
:param string $path: Cookie path
:param string $prefix: Cookie name prefix
:param string $prefix: Cookie name prefix. If set to ``''``, the default value from **app/Config/Cookie.php** will be used
:param bool $secure: Whether to only transfer the cookie through HTTPS
:param bool $httponly: Whether to only make the cookie accessible for HTTP requests (no JavaScript)
:param string $samesite: The value for the SameSite cookie parameter. If set to ``''``, no SameSite attribute will be set on the cookie. If set to ``null``, the default value from **app/Config/Cookie.php** will be used
Expand Down