Pop Cookie Component
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
.gitignore
LICENSE.TXT
README.md
composer.json

README.md

pop-cookie

OVERVIEW

pop-cookie is a component used to manage and manipulate cookies in the PHP web environment.

pop-cookie is a component of the Pop PHP Framework.

INSTALL

Install pop-cookie using Composer.

composer require popphp/pop-cookie

BASIC USAGE

use Pop\Cookie\Cookie;

$cookie = Cookie::getInstance([
    'path'   => '/',
    'expire' => time() + 3600
]);

// Set cookie values
$cookie->foo = 'bar';
$cookie['baz'] = 123;

// Access cookie values
echo $cookie->foo;
echo $cookie['baz'];

// Unset cookie values
unset($cookie->foo);
unset($cookie['baz']);