PHPackages                             kamaro/timetable - 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. kamaro/timetable

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

kamaro/timetable
================

A package to generate weekly timetable

04PHP

Since Jul 11Pushed 6y agoCompare

[ Source](https://github.com/kamaroly/timetable)[ Packagist](https://packagist.org/packages/kamaro/timetable)[ RSS](/packages/kamaro-timetable/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependenciesVersions (1)Used By (0)

TimeTable
=========

[](#timetable)

[![Latest Version on Packagist](https://camo.githubusercontent.com/fe1508e6560f3c6e9dd08cbc540a322286d063dc37562f1b71b72f7b2547853b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f4b616d61726f2f54696d655461626c652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/Kamaro/TimeTable)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/ed7c420fc3effad842bdb4edc869d26b32198d2e0108bc6ce11a85b354ebd3af/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f4b616d61726f2f54696d655461626c652f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/Kamaro/TimeTable)[![Coverage Status](https://camo.githubusercontent.com/eee2b3b0f805dd8bafbb67826ae4c52a83278adebf189dac91916e2d4fc7ab93/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f4b616d61726f2f54696d655461626c652e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/Kamaro/TimeTable/code-structure)[![Quality Score](https://camo.githubusercontent.com/32880c8a7b9b658f490a3d636e80bbb86c920d4ffc20fe91bad96fb38bce600a/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f4b616d61726f2f54696d655461626c652e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/Kamaro/TimeTable)[![Total Downloads](https://camo.githubusercontent.com/97b67c298881b94b123f5312863cc47e5ed3c959cb4f5ed112308d7527b14372/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f4b616d61726f2f54696d655461626c652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/Kamaro/TimeTable)

This package helps you to generate a School time table by providing courses, number of hours and teacher per course. It can be used for other purpose, but initially it was build just for schools

Structure
---------

[](#structure)

```
build/
docs/
config/
src/
tests/
vendor/

```

Requirements
============

[](#requirements)

```
>= php 7.2

```

Install
-------

[](#install)

Via Composer

```
$ composer require kamaro/timetable
```

Features
========

[](#features)

- Course
    - Course Name
    - Teacher name
    - Maximum Hours per Day
    - Maximum Hours per Week.
- Timer
    - Start Day
    - End Day
    - Start Hour
    - End Hour
- TimeTable
    - Generate empty Time Table
    - Generate TimeTable
    - Set break time (TBD)
    - set Weekly break days(TBD);

Usage
=====

[](#usage)

```
    use Kamaro\TimeTable\Course;
    use Kamaro\TimeTable\TimeTable;
    use Kamaro\TimeTable\TimeFrame;

    // Generate fake courses
    $courses = [];
    for ($i = 0; $i < 10; ++$i) {
        $course = new Course();
        $course->setCourseName($fake->name);
        $course->setTeacherName($fake->name);
        $course->setMaxHoursPerDay(2);
        $course->setMaxHoursPerWeek(10);
        $courses[] = $course;
    }
    // Generate TimeTable
    $timeTable = (new TimeTable(
                            new TimeFrame() // TimeFrame
                        )
                 )->getTimeTable($courses);

    echo json_encode($timeTable);
```

Will output below time table

```
{
  "monday": {
    "8": {
      "hour": "8:00",
      "course": "Dr. Keven Spencer MD",
      "teacher": "Rita Reynolds"
    },
    "9": {
      "hour": "9:00",
      "course": "Dr. Keven Spencer MD",
      "teacher": "Rita Reynolds"
    },
    "10": {
      "hour": "10:00",
      "course": "Prof. Talon Wuckert DVM",
      "teacher": "Melba Hammes"
    },
    "11": {
      "hour": "11:00",
      "course": "Prof. Talon Wuckert DVM",
      "teacher": "Melba Hammes"
    },
    "12": {
      "hour": "12:00",
      "course": "Krystel Veum",
      "teacher": "Lily Smitham"
    },
    "13": {
      "hour": "13:00",
      "course": "Krystel Veum",
      "teacher": "Lily Smitham"
    },
    "14": {
      "hour": "14:00",
      "course": "Sarina Flatley II",
      "teacher": "Prof. Pasquale Fritsch"
    },
    "15": {
      "hour": "15:00",
      "course": "Sarina Flatley II",
      "teacher": "Prof. Pasquale Fritsch"
    },
    "16": {
      "hour": "16:00",
      "course": "Sandrine Wiegand",
      "teacher": "Henriette Kertzmann"
    },
    "17": {
      "hour": "17:00",
      "course": "Sandrine Wiegand",
      "teacher": "Henriette Kertzmann"
    },
    "18": {
      "hour": "18:00",
      "course": "Jimmie Fritsch",
      "teacher": "Mrs. Leonora Hill Jr."
    }
  },
  "tuesday": {
    "8": {
      "hour": "8:00",
      "course": "Dr. Keven Spencer MD",
      "teacher": "Rita Reynolds"
    },
    "9": {
      "hour": "9:00",
      "course": "Dr. Keven Spencer MD",
      "teacher": "Rita Reynolds"
    },
    "10": {
      "hour": "10:00",
      "course": "Prof. Talon Wuckert DVM",
      "teacher": "Melba Hammes"
    },
    "11": {
      "hour": "11:00",
      "course": "Prof. Talon Wuckert DVM",
      "teacher": "Melba Hammes"
    },
    "12": {
      "hour": "12:00",
      "course": "Krystel Veum",
      "teacher": "Lily Smitham"
    },
    "13": {
      "hour": "13:00",
      "course": "Krystel Veum",
      "teacher": "Lily Smitham"
    },
    "14": {
      "hour": "14:00",
      "course": "Sarina Flatley II",
      "teacher": "Prof. Pasquale Fritsch"
    },
    "15": {
      "hour": "15:00",
      "course": "Sarina Flatley II",
      "teacher": "Prof. Pasquale Fritsch"
    },
    "16": {
      "hour": "16:00",
      "course": "Sandrine Wiegand",
      "teacher": "Henriette Kertzmann"
    },
    "17": {
      "hour": "17:00",
      "course": "Sandrine Wiegand",
      "teacher": "Henriette Kertzmann"
    },
    "18": {
      "hour": "18:00",
      "course": "Jimmie Fritsch",
      "teacher": "Mrs. Leonora Hill Jr."
    }
  }
```

Change log
----------

[](#change-log)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Testing
-------

[](#testing)

```
$ composer test
```

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

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) and [CODE\_OF\_CONDUCT](CODE_OF_CONDUCT.md) for details.

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [KAMARO](https://github.com/kamaroly)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

20

—

LowBetter than 13% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity37

Early-stage or recently created project

 Bus Factor3

3 contributors hold 50%+ of commits

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://avatars.githubusercontent.com/u/3633772?v=4)[Kamaro Lambert](/maintainers/kamaroly)[@kamaroly](https://github.com/kamaroly)

---

Top Contributors

[![philsturgeon](https://avatars.githubusercontent.com/u/67381?v=4)](https://github.com/philsturgeon "philsturgeon (49 commits)")[![frankdejonge](https://avatars.githubusercontent.com/u/534693?v=4)](https://github.com/frankdejonge "frankdejonge (38 commits)")[![kamaroly](https://avatars.githubusercontent.com/u/3633772?v=4)](https://github.com/kamaroly "kamaroly (11 commits)")[![ravage84](https://avatars.githubusercontent.com/u/625761?v=4)](https://github.com/ravage84 "ravage84 (10 commits)")[![jotaelesalinas](https://avatars.githubusercontent.com/u/2042875?v=4)](https://github.com/jotaelesalinas "jotaelesalinas (8 commits)")[![RobLoach](https://avatars.githubusercontent.com/u/25086?v=4)](https://github.com/RobLoach "RobLoach (7 commits)")[![gmponos](https://avatars.githubusercontent.com/u/5675248?v=4)](https://github.com/gmponos "gmponos (7 commits)")[![hansott](https://avatars.githubusercontent.com/u/3886384?v=4)](https://github.com/hansott "hansott (7 commits)")[![colinodell](https://avatars.githubusercontent.com/u/202034?v=4)](https://github.com/colinodell "colinodell (6 commits)")[![EmanueleMinotto](https://avatars.githubusercontent.com/u/417201?v=4)](https://github.com/EmanueleMinotto "EmanueleMinotto (5 commits)")[![reinink](https://avatars.githubusercontent.com/u/882133?v=4)](https://github.com/reinink "reinink (5 commits)")[![bcrowe](https://avatars.githubusercontent.com/u/752603?v=4)](https://github.com/bcrowe "bcrowe (5 commits)")[![browner12](https://avatars.githubusercontent.com/u/5232313?v=4)](https://github.com/browner12 "browner12 (5 commits)")[![marcqualie](https://avatars.githubusercontent.com/u/101022?v=4)](https://github.com/marcqualie "marcqualie (4 commits)")[![jclyons52](https://avatars.githubusercontent.com/u/6395559?v=4)](https://github.com/jclyons52 "jclyons52 (3 commits)")[![hassankhan](https://avatars.githubusercontent.com/u/1781985?v=4)](https://github.com/hassankhan "hassankhan (3 commits)")[![alexbilbie](https://avatars.githubusercontent.com/u/77991?v=4)](https://github.com/alexbilbie "alexbilbie (2 commits)")[![assertchris](https://avatars.githubusercontent.com/u/200609?v=4)](https://github.com/assertchris "assertchris (2 commits)")[![barryvdh](https://avatars.githubusercontent.com/u/973269?v=4)](https://github.com/barryvdh "barryvdh (2 commits)")[![dragoonis](https://avatars.githubusercontent.com/u/146321?v=4)](https://github.com/dragoonis "dragoonis (2 commits)")

### Embed Badge

![Health badge](/badges/kamaro-timetable/health.svg)

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

###  Alternatives

[hexydec/agentzero

A zero knowledge library for extracting information from User-Agent strings

40117.9k](/packages/hexydec-agentzero)[thedmsgroup/mautic-campaign-watch-bundle

Visual improvements for campaigns.

171.9k](/packages/thedmsgroup-mautic-campaign-watch-bundle)

PHPackages © 2026

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