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

pabloleone/ICS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

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 = new ICS('//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 = new ICS('//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

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages