calendar / icsfile
This simple class generate a .ics file.
8.0.0
2024-03-22 17:07 UTC
Requires
- php: >=8.1.0
Requires (Dev)
- phpstan/phpstan: ^1.10
- phpunit/phpunit: ^10.0
- dev-master
- 8.0.0
- 7.1.0
- 7.0.0
- 6.3.2
- 6.3.1
- 6.3.0
- 6.2.0
- 6.1.2
- 6.1.1
- 6.1.0
- 6.0.3
- 6.0.2
- 6.0.1
- 6.0.0
- 5.4.2
- 5.4.1
- 5.4.0
- 5.3.0
- 5.2.0
- 5.1.4
- 5.1.3
- 5.1.2
- 5.1.1
- 5.1.0
- 5.0.0
- 4.0.1
- 4.0.0
- 3.2.3
- 3.2.2
- 3.2.1
- 3.2.0
- 3.1.3
- 3.1.2
- 3.1.1
- 3.1.0
- 3.0.0
- 2.3.0
- 2.2.5
- 2.2.4
- 2.2.3
- 2.2.2
- 2.2.1
- 2.2.0
- 2.1.5
- 2.1.4
- 2.1.3
- 2.1.2
- 2.1.1
- 2.1.0
- 2.0.0
- 1.1.1
- 1.1.0
This package is auto-updated.
Last update: 2024-08-22 17:57:34 UTC
README
This simple class generate an *.ics file. require php >= 8.1.0
Usage
<?php
require_once 'vendor/autoload.php';
use Ical\Ical;
use Ical\IcalendarException;
try {
$ical = (new Ical())->setAddress('Paris')
->setDateStart(new \DateTime('2014-11-21 15:00:00'))
->setDateEnd(new \DateTime('2014-11-21 16:00:00'))
->setDescription('wonder description')
->setSummary('Running')
->setOrganizer('foo@bar.fr') //optional
->setFilename(uniqid());
->setSequence(2) //Number of updates, the default is at 1, optional
$ical->addHeader();
echo $ical->getICAL();
} catch (IcalendarException $exc) {
echo $exc->getMessage();
}