PHPackages                             marioquartz/making-sessions - 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. marioquartz/making-sessions

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

marioquartz/making-sessions
===========================

Group events in sessions

v0.1.1(5y ago)025MITPHPPHP &gt;=7.4CI passing

Since Jun 26Pushed 2w ago1 watchersCompare

[ Source](https://github.com/marioquartz/making-sessions)[ Packagist](https://packagist.org/packages/marioquartz/making-sessions)[ RSS](/packages/marioquartz-making-sessions/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (3)Dependencies (2)Versions (5)Used By (0)

MakingSessions
==============

[](#makingsessions)

This library has one goal: **organizing list of events in sessions**. You can add "events" with a start and end or, a duration. This library is made for separating the events for types of events.

The origin of this library is sort the actions when I work, each project is a different type of event. With this library now I can see how much time work in each project.

Using the library
=================

[](#using-the-library)

You start initialising the *Maker* class and adding the events:

```
use Marioquartz\MakingSessions\Maker;
use Marioquartz\MakingSessions\Event;

$maker=new Maker();
foreach ($list as $item) {
    $event=new Event();
    $event
        ->setStart($start) //start can be a timestamp or a DateInmutable
        ->setDuration(60) // you can set the duration or use setEnd()
        ->setType("example");
    $maker->add($event);
}
```

Generate the list of sessions with their events is easy:

```
$sessions=$maker->getSessions();
```

**But, what is a "*session*"?** An aggregate of events that are "near". In the context of this library: the difference between the end of an event and the start of next event is less than the variable "timeMerge". By default is 300 seconds (5 minutes). You can configure this behaviour with *$maker-&gt;setTimeMerge($seconds)*.

*$sessions* now have a list of sessions, that can be iterated:

```
foreach($sessions as $session) {
    echo $session->getStart(); // Start of the session returned as timestamp
    echo $session->getEnd(); //End as timestamp
    echo $session->getDuration() // Duration in seconds
    echo $session->getType(); // Type of the events inside
    foreach ($session->getEvents() as $event) {
        //events have the same functions: getStart(), getEnd(), getDuration() and getType()
    }
}
```

Helping
=======

[](#helping)

This is my first real library. I don't have much experience, so of course this library have a big room for make better code or usefulness. If you are a kind person, and you think have an idea or if you have a bug, im all ears.

###  Health Score

32

—

LowBetter than 69% of packages

Maintenance63

Regular maintenance activity

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity45

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

Total

3

Last Release

1831d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/ad045cd75b698858b2e75424bafceedb0dc7f29b30698c2e7ea6f7ed980746d1?d=identicon)[marioquartz](/maintainers/marioquartz)

---

Top Contributors

[![marioquartz](https://avatars.githubusercontent.com/u/3995147?v=4)](https://github.com/marioquartz "marioquartz (26 commits)")

###  Code Quality

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/marioquartz-making-sessions/health.svg)

```
[![Health](https://phpackages.com/badges/marioquartz-making-sessions/health.svg)](https://phpackages.com/packages/marioquartz-making-sessions)
```

###  Alternatives

[krizon/php-ga-measurement-protocol

Easy use of the Google Analytics Measurement Protocol in PHP

110603.9k5](/packages/krizon-php-ga-measurement-protocol)[rasteiner/k3-whenquery

Conditionally show fields and sections. Better.

6619.8k](/packages/rasteiner-k3-whenquery)[xi/collections

Functional, immutable and extensible enumerations and collections for PHP 5.3.

26100.7k1](/packages/xi-collections)[chippyash/monad

Functional programming Monad support

2828.5k8](/packages/chippyash-monad)[simonstamm/laravel-pjax

PJAX for Laravel 4 with redirection-support

228.3k](/packages/simonstamm-laravel-pjax)

PHPackages © 2026

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