2017 © Pedro Peláez
 

library pop-cookie

Pop Cookie Component for Pop PHP Framework

image

popphp/pop-cookie

Pop Cookie Component for Pop PHP Framework

  • Monday, January 29, 2018
  • by nicksagona
  • Repository
  • 1 Watchers
  • 1 Stars
  • 632 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 6 Versions
  • 8 % Grown

The README.md

pop-cookie

Build Status Coverage Status, (*1)

Join the chat at https://discord.gg/TZjgT74U7E, (*2)

Overview

pop-cookie is a component used to securely create and manage cookies in a PHP web environment. With it, you can set and retrieve cookie values, as well as set required configuration options for the web application environment., (*3)

pop-cookie is a component of the Pop PHP Framework., (*4)

Top, (*5)

Install

Install pop-cookie using Composer., (*6)

composer require popphp/pop-cookie

Or, require it in your composer.json file, (*7)

"require": {
    "popphp/pop-cookie" : "^4.0.3"
}

Top, (*8)

Quickstart

The cookie object can be created using the getInstance() method, which takes an options array:, (*9)

use Pop\Cookie\Cookie;

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

Available options

$options = [
    'path'     => '/',
    'expire'   => time() + 3600,
    'domain'   => 'www.domain.com',
    'secure'   => true,
    'httponly' => true,
    'samesite' => 'Lax'  // 'Lax', 'Strict', 'None'
];

From there, you can interact with the cookie object., (*10)

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

Top, (*11)

The Versions

29/01 2018

dev-master

9999999-dev http://www.popphp.org/

Pop Cookie Component for Pop PHP Framework

  Sources   Download

BSD-3-Clause New BSD

The Requires

  • php >=5.6.0

 

php cookie cookies pop pop php

29/01 2018

dev-v3-dev

dev-v3-dev http://www.popphp.org/

Pop Cookie Component for Pop PHP Framework

  Sources   Download

BSD-3-Clause New BSD

The Requires

  • php >=5.6.0

 

php cookie cookies pop pop php

29/01 2018

3.1.2

3.1.2.0 http://www.popphp.org/

Pop Cookie Component for Pop PHP Framework

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.6.0

 

php cookie cookies pop pop php

29/12 2017

3.1.1

3.1.1.0 http://www.popphp.org/

Pop Cookie Component for Pop PHP Framework

  Sources   Download

New BSD

The Requires

  • php >=5.6.0

 

php cookie cookies pop pop php

22/02 2017

3.1.0

3.1.0.0 http://www.popphp.org/

Pop Cookie Component for Pop PHP Framework

  Sources   Download

New BSD

The Requires

  • php >=5.6.0

 

php cookie cookies pop pop php

10/07 2016

3.0.0

3.0.0.0 http://www.popphp.org/

Pop Cookie Component for Pop PHP Framework

  Sources   Download

New BSD

The Requires

  • php >=5.4.0

 

php cookies pop pop php