Download the PHP package alexsoft12/simple_calendar without Composer
On this page you can find all versions of the php package alexsoft12/simple_calendar. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download alexsoft12/simple_calendar
More information about alexsoft12/simple_calendar
Files in alexsoft12/simple_calendar
Package simple_calendar
Short Description Framework-agnostic calendar generator for PHP
License MIT
Homepage https://github.com/alexsoft12/simple_calendar
Informations about the package simple_calendar
Simple Calendar
Framework-agnostic calendar generator for PHP 8.4+.
Screenshot
Highlights
- Pure PHP core
- Immutable fluent API
- Built-in translations loaded from PHP files
- Bootstrap 4 friendly default template
- Fully customizable templates through arrays or JSON
Requirements
- PHP 8.4+
Installation
Basic Usage
The package does not ship any CSS. The default template only outputs simple HTML using familiar Bootstrap 4 classes.
Fluent API
Preconfigured Generator
You can configure the generator once and then start a fluent chain from month().
Templates
Custom templates can be passed as arrays or JSON strings.
Bootstrap 4 Default
Array Template
JSON Template
Events
events() accepts:
CalendarEventsByDayday => htmlday => [[title, content, attributes]]CalendarEventCalendarEventData
Translations
The core ships with PHP file based translations in src/lang.
Included locales:
enes
You can also point to your own translation directory:
Default Markup
The default template uses familiar Bootstrap 4 classes such as:
tabletable-borderedtable-smtable-responsive
The package does not inject styles. If your application does not use Bootstrap, provide your own template.
Security Notes
- Event content is rendered as trusted HTML by design.
- Custom templates are rendered as trusted HTML by design.
- HTML attributes provided through event metadata are normalized and escaped before rendering.
- If event content comes from users, sanitize it before passing it to the package.
- If you use a custom translation directory, treat it as trusted application code because translation files are loaded as PHP.
Testing
License
This project is released under the MIT License.