Allow setting arbitrary keys in the cookie array

This commit is contained in:
Hypolite Petovan 2021-01-17 17:30:18 -05:00
commit c644d76d28
4 changed files with 171 additions and 172 deletions

View file

@ -35,22 +35,24 @@ class StaticCookie extends Cookie
/**
* Send a cookie - protected, internal function for test-mocking possibility
* @see Cookie::setCookie()
*
* @link https://php.net/manual/en/function.setcookie.php
*
* @param string $name
* @param string $value [optional]
* @param int $expire [optional]
* @param bool $secure [optional]
* @return bool
*
* @noinspection PhpMissingParentCallCommonInspection
*
* @link https://php.net/manual/en/function.setcookie.php
*
* @see Cookie::setCookie()
*/
protected function setCookie(string $name, string $value = null, int $expire = null, bool $secure = null)
protected function setCookie(string $value = null, int $expire = null, bool $secure = null): bool
{
self::$_COOKIE[$name] = $value;
self::$_COOKIE[self::NAME] = $value;
self::$_EXPIRE = $expire;
return true;
}
public static function clearStatic()