cuephp/cookie

cuephp Cookie Component

0.1.0 2021-11-25 13:28 UTC

This package is auto-updated.

Last update: 2024-11-29 06:47:18 UTC


README

Build Status Code Coverage

Latest Stable Version Total Downloads

Instanll

compose require cuephp/cookie

Usage

extra from header

use CuePhp\CookieManager;


$cookie = CookieManager::createFromHeaders($cookieString); // cookie string is  from http header

// get cookie value
$cookie->getValue();

Set value to Header

use CuePhp\CookieManager;

$cookie = CookieManager::new( 'name', 'value' );
CookieManager::setToClientHeaders($cookie); // will set response header set-cookie

Set value With Options

use CuePhp\CookieManager;
$cookie = CookieManager::new( 'name', 'value', {$options} );
options
  • expires:
  • path:
  • secure:
  • domain:
  • httponly:
  • samesite: