Skip to content
master
Switch branches/tags
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
src
 
 
 
 
 
 
 
 
 
 
 
 

README.md

pop-cookie

Build Status Coverage Status

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']);