2017 © Pedro Peláez
 

package socs-calendar-ics-parser

A PHP Script that parses an ICS file from SOCS, in a readable format to dispaly elsewhere.

image

fredbradley/socs-calendar-ics-parser

A PHP Script that parses an ICS file from SOCS, in a readable format to dispaly elsewhere.

  • Friday, July 27, 2018
  • by fredbradley
  • Repository
  • 1 Watchers
  • 0 Stars
  • 10 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 7 Versions
  • 0 % Grown

The README.md

SOCS .ics Calendar Parser

A PHP Script that parses an ICS file from SOCS, in a readable format to display elsewhere., (*1)

Features

  • Super easy to use.
  • Once you've included it in your composer package, just one line of code will get you a PHP array of Event Objects.
  • Compatible with Wordpress transients, if you use Wordpress.
  • Compatible with Laravel Caching, if you use Laravel.
  • Actively managed - if you have a feature or idea request, please let me know, or even better - submit a pull request.

Requirements

This project requires PHP 7. I'm too lazy to write for PHP5.6 these days. Get with the program!, (*2)

How to install

composer install fredbradley/socs-calendar-ics-parser

Examples

Wordpress Widget Example

This is written to work with Wordpress and even has Wordpress Caching (set_transient) functionality built in, to speed up page load times., (*3)

If you want to see an example of a widget that uses this code, please see this piece of code in my 'cranleigh-socs' plugin. If you like you can install the entire Cranleigh SOCS Plugin, but be aware it's written in Bootstrap 3 with HTML markup specifically for our sites., (*4)

Wordpress Example, (*5)

If you want some help customising it, I'd be happy to help., (*6)

Usage

Options

  • minNumEvents (default: 5)
  • ignoreCache (default: false) Set to true if you don't want get the object from the cache.
  • cacheName (default: 'calendar-cache') if you have more than one instance of this, you should probably give each instance a unique cache name, so they don't overwrite each other
  • weeksAhead (default: 15) how many weeks ahead to you want to get the events for, (*7)

    Basic Example with Default Options

    $ics_url = "<YOUR URL FOR YOUR ICS HERE>";
    $calendar = new \FredBradley\SOCSICSParser\CalendarEvents( $ics_url );
    

    Example with custom options

    $ics_url = "<YOUR URL FOR YOUR ICS HERE>";
    $options = [
    'minNumEvents' => 10,
    'cacheName' => 'my-music-calendar'
    ];
    $calendar = new \FredBradley\SOCSICSParser\CalendarEvents( $ics_url, $options );
    

The Versions

27/07 2018

dev-master

9999999-dev

A PHP Script that parses an ICS file from SOCS, in a readable format to dispaly elsewhere.

  Sources   Download

AGPL-3.0-or-later

The Requires

 

27/07 2018

1.0.5

1.0.5.0

A PHP Script that parses an ICS file from SOCS, in a readable format to dispaly elsewhere.

  Sources   Download

AGPL-3.0-or-later

The Requires

 

25/07 2018

1.0.4

1.0.4.0

A PHP Script that parses an ICS file from SOCS, in a readable format to dispaly elsewhere.

  Sources   Download

AGPL-3.0-or-later

The Requires

 

25/07 2018

1.0.3

1.0.3.0

A PHP Script that parses an ICS file from SOCS, in a readable format to dispaly elsewhere.

  Sources   Download

AGPL-3.0-or-later

The Requires

 

23/07 2018

1.0.2

1.0.2.0

A PHP Script that parses an ICS file from SOCS, in a readable format to dispaly elsewhere.

  Sources   Download

GNU AGPLv3

The Requires

 

23/07 2018

1.0.1

1.0.1.0

A PHP Script that parses an ICS file from SOCS, in a readable format to dispaly elsewhere.

  Sources   Download

MIT

The Requires

 

20/07 2018

1.0.0

1.0.0.0

A PHP Script that parses an ICS file from SOCS, in a readable format to dispaly elsewhere.

  Sources   Download

MIT

The Requires