cuephp / cookie
cuephp Cookie Component
0.1.0
2021-11-25 13:28 UTC
Requires
- php: ^7.2 || ^8.0
Requires (Dev)
- phpstan/phpstan: ^1.2
- phpunit/phpunit: ^9.5
- squizlabs/php_codesniffer: *
README
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: