public function setCookie($name, $value, $time, $path = '', $domain = '', $secure = null, $httpOnly = null) { if (BaseService::isNotString($name)) { throw new FrmworkExcep\InvalidArgumentException(self::$msgForInvalidArgExcp, Response::class, __METHOD__, '$name', 'string'); } if (is_null($value)) { throw new FrmworkExcep\NullReferenceException('Попытка передачи null.', Response::class, __METHOD__, '$value'); } setcookie($name, $value, $time != null ? \DateTime::from($time)->format('U') : 0, $path == null ? $this->cookiePath : (string) $path, $domain == null ? $this->cookieDomain : (string) $domain, $secure == null ? $this->cookieSecure : (bool) $secure, $httpOnly == null ? $this->cookieHttpOnly : (bool) $httpOnly); }