PHPackages                             ezeasorekene/php-cookie-manager - 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. ezeasorekene/php-cookie-manager

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

ezeasorekene/php-cookie-manager
===============================

This class provides methods to manage cookies in PHP applications.

v2.1.1(2y ago)037MITPHP

Since Oct 12Pushed 2y ago1 watchersCompare

[ Source](https://github.com/ezeasorekene/php-cookie-manager)[ Packagist](https://packagist.org/packages/ezeasorekene/php-cookie-manager)[ RSS](/packages/ezeasorekene-php-cookie-manager/feed)WikiDiscussions main Synced today

READMEChangelog (4)DependenciesVersions (5)Used By (0)

PHP Cookie Manager
==================

[](#php-cookie-manager)

This class provides methods to manage cookies in PHP applications.

[![Latest Version on Packagist](https://camo.githubusercontent.com/8df88188186c6f5a27fbdedc49a3ffb5521ed53a4c64af1f11423b3fd96ab0da/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f657a6561736f72656b656e652f7068702d636f6f6b69652d6d616e616765722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/ezeasorekene/php-cookie-manager)[![License: MIT](https://camo.githubusercontent.com/fdf2982b9f5d7489dcf44570e714e3a15fce6253e0cc6b5aa61a075aac2ff71b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d79656c6c6f772e737667)](https://opensource.org/licenses/MIT)

This PHP class provides convenient methods to manage cookies in web applications.

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

[](#installation)

You can install this package using Composer:

```
composer require ezeasorekene/php-cookie-manager
```

Usage
-----

[](#usage)

```
// Get the value of a cookie
$username = Cookie::get('username');

// Set a cookie with custom options
Cookie::set('user_id', 123, ['expires' => time() + 3600, 'secure' => true]);

// Check if a cookie exists
if (Cookie::has('token')) {
    // Perform an action
}

// Destroy a cookie
Cookie::destroy('session_id');
```

Methods
-------

[](#methods)

```
get($name)
Get the value of a cookie.

set($name, $value, $options = [])
Set a cookie.

setMultiple($cookies, $options = [])
Set multiple cookies.

has($name)
Check if a cookie exists.

destroy($name, $options = [])
Destroy a cookie.

destroyMultiple($cookies, $options = [])
Destroy multiple cookies.

jsonSet($name, $value, $options = [])
Set a JSON-encoded cookie.

jsonGet($name, $assoc = false)
Get the JSON-decoded value of a cookie.

jsonHas($name)
Check if a JSON-encoded cookie exists.

jsonDestroy($name, $options = [])
Destroy a JSON-encoded cookie.

jsonDestroyMultiple($cookies, $options = [])
Destroy multiple JSON-encoded cookies.
```

Contributing
------------

[](#contributing)

If you'd like to contribute, please fork the repository and make your changes. Pull requests are warmly welcome.

License
-------

[](#license)

This package is licensed under the MIT License.

Author
------

[](#author)

[Ezeasor Ekene](https://github.com/ezeasorekene)

Contact
-------

[](#contact)

For inquiries, please email me at

Copyright
---------

[](#copyright)

© 2023 Ezeasor Ekene. All rights reserved.

###  Health Score

22

—

LowBetter than 21% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

 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 ~51 days

Total

4

Last Release

841d ago

Major Versions

v1.0.0 → v2.0.02023-10-13

### Community

Maintainers

![](https://www.gravatar.com/avatar/4b46fcc0683d431ddc5e58b130d6b2eed735f6a80de633c7bfe17a1a2effe190?d=identicon)[ezeasorekene](/maintainers/ezeasorekene)

---

Top Contributors

[![ezeasorekene](https://avatars.githubusercontent.com/u/16192931?v=4)](https://github.com/ezeasorekene "ezeasorekene (11 commits)")

### Embed Badge

![Health badge](/badges/ezeasorekene-php-cookie-manager/health.svg)

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

###  Alternatives

[ircmaxell/php-cfg

A Control Flow Graph implementation for PHP

247103.3k2](/packages/ircmaxell-php-cfg)[prewk/option

Option object for PHP inspired by Rust

47953.2k2](/packages/prewk-option)[illuminate/process

The Illuminate Process package.

44869.2k99](/packages/illuminate-process)[orchestra/dusk-updater

Updater for Laravel Dusk ChromeDriver binaries

101.2M6](/packages/orchestra-dusk-updater)

PHPackages © 2026

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