Skip to content
This repository was archived by the owner on Dec 9, 2021. It is now read-only.

Latest commit

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

ICS

Class for iCalendar(.ics) file creation.

Is made into Laravel 4 environment as a library, but you can use it everywhere, always adding dependecies.

Dependency:

Illuminate\Filesystem\Filesystem

Usage

Create the object:

$ics = newICS('//Company//Product//EN', array(
'startDate' => $startTimestamp,
'endDate' => $endTimestamp,
'address' => $addressString,
'summary' => $summaryString,
'uri' => $uriString,
'description' => $descriptionString
));

If you want you can contruct as required like:

$ics = newICS('//Company//Product//EN');
$ics->startDate($startTimestamp)
->endDate($endTimestamp)
->address($addressString)
->summary($summaryString)
->uri($uriString)
->description($descriptionString);

Get the markup as string:

$ics->get();

Save file to file:

If there is no file name this will be date('Ymd', time()).

$ics->save('path/to/save', 'optional_file_name');

Also you can construct as required like:

$ics->path = 'path/to/save';
$ics->save();

You can get the file path from:

$ics->path;

Delete file:

$ics->delete();

Enjoy!

About

iCalendar(.ics) file creator

Resources

Stars

9 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages