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

ActiveLibrary

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

Group events in sessions

v0.1.1(4y ago)025MITPHPPHP &gt;=7.4

Since Jun 26Pushed 4y 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 4d 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

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity44

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

1784d 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 (23 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)
```

PHPackages © 2026

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