Download the PHP package om/icalparser without Composer

On this page you can find all versions of the php package om/icalparser. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package icalparser

Packagist Version Packagist Downloads Packagist License Packagist PHP Version PHP Tests

PHP iCal Parser

A lightweight and robust iCalendar (RFC 5545) parser for PHP. Documentation: ozzyczech.github.io/icalparser

Install

Usage

Events, tasks (todos()), journal entries (journals()) and free/busy components (freeBusy()) have typed getters: uid(), summary(), description(), location(), start(), end(), duration(), status(), categories(), organizer(), attendees(), alarms(), recurrenceRule(), color(), images() and more, see reading calendars. Any property, including unknown ones, is available too:

Dates and times

start(), end() and the occurrences return DateTimeValue, which keeps the difference between 20261010 (a date), 20261010T100000 (floating), 20261010T100000Z (UTC) and TZID=Europe/Prague:20261010T100000 (zoned). Floating times and dates are never converted with the PHP default timezone:

The timezone of dates and floating times is X-WR-TIMEZONE of the calendar or the one configured with ICal::parser()->floatingTimezone(...). See values and timezones.

Recurring events

Occurrences are generated lazily and only for a window or up to a limit; there is no unlimited expansion. The recurrence engine can be used on its own:

See recurrence.

Strict and permissive parsing

The permissive mode (default) repairs damaged files and reports each repair as a warning. The strict mode throws an exception with an error code, line, property and raw value. Limits of the input and of recurrence expansion protect against pathological files. See validation.

Large files

Creating calendars

Values are formatted and escaped, UID, DTSTAMP and a VTIMEZONE for every timezone used are added, invalid combinations are rejected. Parsed calendars are serialized with all their properties, lines are folded at 75 octets. See creating calendars.

Examples

Recipes show common tasks: reading a feed from a URL, events in the viewer's timezone, JSON for a web calendar, a filtered copy, a subscription feed, e-mail invitations and checking uploads.

The examples directory contains a web page listing upcoming events of a sample calendar (php -S localhost:8000 -t examples) and command line scripts for streaming, validation and writing.

Upgrading from version 4

The array based IcalParser of version 4 is still available and deprecated (it will be removed in 5.5 at the latest); it keeps its output and fixes many bugs. See CHANGELOG.md.

Development

iCal parser uses Nette Tester, PHPStan and PHP CS Fixer.

The differential test needs Python with dateutil and is skipped without it: python3 -m venv .venv && .venv/bin/pip install python-dateutil, then run it with ICALPARSER_PYTHON=.venv/bin/python.

The documentation at ozzyczech.github.io/icalparser is built by Starlight from docs/*.md, UPGRADING.md and CHANGELOG.md, and by ApiGen from the docblocks of src/ (.github/workflows/docs.yml). Preview it with composer create-project apigen/apigen:dev-master ../apigen --no-dev && php ../apigen/bin/apigen, then cd website && npm install && npm run dev.

Every calendar in tests/Fixtures has a golden file with the normalized output. After an intended change, regenerate them with UPDATE_SNAPSHOTS=1 composer test:integration and review the diff. Every bug gets a fixture in tests/Fixtures/Regression or a test.


All versions of icalparser with dependencies

PHP Build Version
Package Version
Requires php Version ^8.4
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package om/icalparser contains the following files

Loading the files please wait ...