2017 © Pedro Peláez
 

library cookie

A simple and light cookie manager class

image

overclokk/cookie

A simple and light cookie manager class

  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 15 % Grown

The README.md

Cookie Class API

GitHub release License Total Downloads, (*1)

Get and set cookies in PHP with ease., (*2)

PHP >= 5.3, (*3)

Installation

Install this package through Composer:, (*4)

composer require overclokk/cookie

PHP Implementation

Autoload the vendor classes:, (*5)

    require_once 'vendor/autoload.php'; // Path may vary

And then use the Cookie implementation:, (*6)

    $cookie = new \Overclokk\Cookie\Cookie();

or, (*7)

    $cookie = new \Overclokk\Cookie\Cookie( $_COOKIE );

Usage

This will return null if the cookie doesn't exist or is expired., (*8)

    $cookie_value = $cookie->get( 'cookie_name' );

If you don't specify $minutes, a default of 0 will be used., (*9)

    $minutes = 120 * 60;
    $cookie->set( 'cookie_name', 'cookie_value', $minutes );
    $cookie->forever( 'cookie_name', 'cookie_value' );

If the cookie doesn't exist, nothing will happen..., (*10)

    $cookie->delete('cookie_name');

The Versions

17/02 2018

dev-master

9999999-dev

A simple and light cookie manager class

  Sources   Download

GPLv2 GPL-2.0+

The Development Requires

17/02 2018

v1.0.2

1.0.2.0

A simple and light cookie manager class

  Sources   Download

GPL-2.0+

The Development Requires

07/06 2017

v1.0.1

1.0.1.0

A simple and light cookie manager class

  Sources   Download

GPLv2

The Development Requires

03/02 2017

v1.0.0

1.0.0.0

A simple and light cookie manager class

  Sources   Download

GPLv2

The Development Requires