PHPackages                             overclokk/cookie - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. overclokk/cookie

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

overclokk/cookie
================

A simple and light cookie manager class

v1.0.2(8y ago)82.7k↓67.9%21GPL-2.0+PHP

Since Feb 3Pushed 1y ago1 watchersCompare

[ Source](https://github.com/overclokk/cookie)[ Packagist](https://packagist.org/packages/overclokk/cookie)[ RSS](/packages/overclokk-cookie/feed)WikiDiscussions master Synced yesterday

READMEChangelog (7)Dependencies (1)Versions (9)Used By (1)

Cookie Class API
================

[](#cookie-class-api)

![GitHub release](https://camo.githubusercontent.com/b6ed548b315a603b2e6bc9d8f969b0dfd01f95cae635d21a26893e37427557ae/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f6f766572636c6f6b6b2f636f6f6b69652e737667)![License](https://camo.githubusercontent.com/512f0ff6697bd554e299563275d9f97069a1eba8d9f2277fd4d25c6a08a9dead/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6f766572636c6f6b6b2f636f6f6b69652e737667)[![Total Downloads](https://camo.githubusercontent.com/ff1095b77fab02cbdff283a53c4f7363613dfc1d5e90541f2784e6c37af7059a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6f766572636c6f6b6b2f636f6f6b69652e737667)](https://packagist.org/packages/overclokk/cookie)

### A simple and light php class for Cookie!

[](#a-simple-and-light-php-class-for-cookie)

Get and set cookies in PHP with ease.

PHP &gt;= 5.3

Installation
------------

[](#installation)

Install this package through Composer:

```
composer require overclokk/cookie

```

PHP Implementation
------------------

[](#php-implementation)

Autoload the vendor classes:

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

And then use the `Cookie` implementation:

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

or

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

Usage
-----

[](#usage)

### Get a cookie

[](#get-a-cookie)

This will return `null` if the cookie doesn't exist or is expired.

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

### Store a cookie for a limited time

[](#store-a-cookie-for-a-limited-time)

If you don't specify `$minutes`, a default of 0 will be used.

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

### Set a cookie forever

[](#set-a-cookie-forever)

```
    $cookie->forever( 'cookie_name', 'cookie_value' );
```

### Delete a cookie

[](#delete-a-cookie)

If the cookie doesn't exist, nothing will happen...

```
    $cookie->delete('cookie_name');
```

###  Health Score

38

—

LowBetter than 83% of packages

Maintenance31

Infrequent updates — may be unmaintained

Popularity27

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~486 days

Recently: every ~635 days

Total

7

Last Release

516d ago

Major Versions

v1.0.2 → 2.0.0-alpha.12025-02-01

PHP version history (2 changes)2.0.0-alpha.1PHP &gt;=7.4 &lt;8.3

2.0.0-alpha.4PHP &gt;=7.4 &lt;8.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/13d145319a065be260ee79e728655780ddd63002e5ac6c317701c8996ec8d94c?d=identicon)[overclokk](/maintainers/overclokk)

---

Top Contributors

[![overclokk](https://avatars.githubusercontent.com/u/4604932?v=4)](https://github.com/overclokk "overclokk (10 commits)")

### Embed Badge

![Health badge](/badges/overclokk-cookie/health.svg)

```
[![Health](https://phpackages.com/badges/overclokk-cookie/health.svg)](https://phpackages.com/packages/overclokk-cookie)
```

###  Alternatives

[rias/craft-schema

A fluent builder Schema.org types and ld+json generator based on Spatie's schema-org package

1929.0k](/packages/rias-craft-schema)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
