PHPackages                             qcubed-4/common - 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. qcubed-4/common

ActiveQcubed-library[Utility &amp; Helpers](/categories/utility)

qcubed-4/common
===============

The common files used by many of the components of the QCubed-4 framework

0158[1 issues](https://github.com/qcubed-4/common/issues)2PHP

Since Apr 25Pushed 2mo ago2 watchersCompare

[ Source](https://github.com/qcubed-4/common)[ Packagist](https://packagist.org/packages/qcubed-4/common)[ RSS](/packages/qcubed-4-common/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (2)

QCubed-4 Common Library
=======================

[](#qcubed-4-common-library)

Common classes for the entire QCubed-4 framework.

There are several repositories:

- **qcubed-4/application** — the core QCubed functionality: forms, controls, UI rendering
- **qcubed-4/orm** — the object-relational mapper enabling powerful queries
- **qcubed-4/i18n** — translation and localization services
- **qcubed-4/cache** — caching layers for QCubed
- **qcubed-4/app-starter** — a quick-start template to begin new QCubed projects
- **qcubed-4/common** — shared classes used across QCubed-4 repositories
- **qcubed-4/bootstrap** — Bootstrap integration for QCubed

---

SessionCleaner Utility
----------------------

[](#sessioncleaner-utility)

`SessionCleaner` is a lightweight helper that automatically manages and cleans temporary PHP session keys.

This utility is extremely helpful in workflows such as:

- image uploads &amp; avatar croppie handlers
- wizard / multi-step forms
- modal-based temporary actions
- any UI process that stores short-lived state

### Key Features

[](#key-features)

- **Automatic cleanup** of expired session keys
- **Protected keys** via `setPreserveKeys()`
- **Timestamp-based expiration tracking**
- **One-line global cleanup** with `autoClean()`
- **Developer debug mode**
    - Direct call: ```
        SessionCleaner::debugDump();
        ```
    - OR via URL parameter: ```
        ?sc_debug=1

        ```

### ✔ Usage Example

[](#-usage-example)

```
use QCubed\Helper\SessionCleaner;

// Session keys that must never be removed
SessionCleaner::setPreserveKeys(['logged_user_id', 'csrf_token', 'qformstate']);

// Automatically remove temporary session keys older than 30 minutes
SessionCleaner::autoClean(1800);
```

More details can be found in: docs/SessionCleaner.md

[![Ask DeepWiki](https://camo.githubusercontent.com/0f5ae213ac378635adeb5d7f13cef055ad2f7d9a47b36de7b1c67dbe09f609ca/68747470733a2f2f6465657077696b692e636f6d2f62616467652e737667)](https://deepwiki.com/qcubed-4/common)

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance57

Moderate activity, may be stable

Popularity10

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity11

Early-stage or recently created project

 Bus Factor1

Top contributor holds 85.7% 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/f118ebc7b4a8f5223d1faf215226596c05404614b1154c05d774cfb6fe859026?d=identicon)[qcubed-4](/maintainers/qcubed-4)

---

Top Contributors

[![kukrik](https://avatars.githubusercontent.com/u/2853034?v=4)](https://github.com/kukrik "kukrik (24 commits)")[![qcubed-temp](https://avatars.githubusercontent.com/u/83004588?v=4)](https://github.com/qcubed-temp "qcubed-temp (4 commits)")

### Embed Badge

![Health badge](/badges/qcubed-4-common/health.svg)

```
[![Health](https://phpackages.com/badges/qcubed-4-common/health.svg)](https://phpackages.com/packages/qcubed-4-common)
```

###  Alternatives

[qinchen/web-utils

A web application common utils

111.4k](/packages/qinchen-web-utils)

PHPackages © 2026

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