2017 © Pedro Peláez
 

library sked

Open source PHP calendar library

image

campusunion/sked

Open source PHP calendar library

  • Friday, November 4, 2016
  • by mopo922
  • Repository
  • 1 Watchers
  • 0 Stars
  • 38 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 27 Versions
  • 0 % Grown

The README.md

Sked

Open source PHP Calendar library., (*1)

Installation & Setup

First, run the SQL create statements on your database:, (*2)

sql/create.sked_events.sql
sql/create.sked_event_members.sql
sql/create.sked_event_tags.sql

Then, instantiate Sked in your code with data connection credentials:, (*3)

$sked = new \CampusUnion\Sked([
    'data_connection' => [
        'name' => 'PDO',
        'options' => [
            'driver' => 'mysql',
            'host' => 'localhost',
            'dbname' => 'homestead',
            'user' => 'homestead',
            'pass' => 'secret',
        ],
    ],
]);

Basic usage

Event form

echo $sked->form();

Saving events to the database

$sked->save(new SkeVent($_POST));

Build a custom calendar by iterating through a specified date range:, (*4)

foreach ($sked->skeDates('2016-08-05', '2016-09-21')) {
    // do something awesome
}

The SkeDate Object

A SkeDate object is useful for populating a particular date in your calendar UI., (*5)

Print the date using the format() method, which accepts a formatting string as an optional parameter (see formatting options for PHP's date function):, (*6)

echo $skeDate->format('j'); // default format is 'Y-m-d' (e.g., 2016-08-05)

Then you can iterate through its events:, (*7)

foreach ($skeDate->skeVents(/* Optionally pass a user ID to get events for a certain user. */)) {
    // do something awesome
}

The SkeVent Object

A SkeVent object allows for easy access and manipulation of an event., (*8)

Retrieve any database field (see SQL queries) as a property:, (*9)

echo $skeVent->label;

Print the event time using the time() method, which accepts a formatting string as an optional parameter (see formatting options for PHP's date function):, (*10)

echo $skeVent->time('Hi'); // default format is 'g:ia' (e.g., 2:15pm)

SkeVent::time() accepts a second optional parameter for timezone adjustment. To adjust the event's time to a particular timezone, just pass in the timezone offset integer:, (*11)

echo $skeVent->time(null, -5); // outputs the time adjusted for US Eastern Standard time

Basic-er Usage

For an instant, non-customized event form, use the magical skeDoosh() method. The only required configuration is connection parameters for your data store. Call skeDoosh() from the exact spot in your code where you want the HTML form to be displayed:, (*12)

Sked::skeDoosh([
    'data_connector' => [
        'name' => 'PDO',
        'options' => [
            'driver' => 'mysql',
            'host' => 'localhost',
            'dbname' => 'homestead',
            'user' => 'homestead',
            'pass' => 'secret',
        ],
    ],
]);

The Versions

04/11 2016

dev-master

9999999-dev http://github.com/CampusUnion/Sked

Open source PHP calendar library

  Sources   Download

MIT

The Requires

 

04/11 2016

v0.0.26

0.0.26.0 http://github.com/CampusUnion/Sked

Open source PHP calendar library

  Sources   Download

MIT

The Requires

 

26/10 2016

v0.0.25

0.0.25.0 http://github.com/CampusUnion/Sked

Open source PHP calendar library

  Sources   Download

MIT

The Requires

 

14/09 2016

v0.0.24

0.0.24.0 http://github.com/CampusUnion/Sked

Open source PHP calendar library

  Sources   Download

MIT

The Requires

 

23/08 2016

v0.0.23

0.0.23.0 http://github.com/CampusUnion/Sked

Open source PHP calendar library

  Sources   Download

MIT

The Requires

 

20/08 2016

v0.0.22

0.0.22.0 http://github.com/CampusUnion/Sked

Open source PHP calendar library

  Sources   Download

MIT

The Requires

 

03/08 2016

v0.0.21

0.0.21.0 http://github.com/CampusUnion/Sked

Open source PHP calendar library

  Sources   Download

MIT

The Requires

 

07/06 2016

v0.0.20

0.0.20.0 http://github.com/CampusUnion/Sked

Open source PHP calendar library

  Sources   Download

MIT

The Requires

 

23/05 2016

v0.0.19

0.0.19.0 http://github.com/CampusUnion/Sked

Open source PHP calendar library

  Sources   Download

MIT

The Requires

 

20/05 2016

v0.0.18

0.0.18.0 http://github.com/CampusUnion/Sked

Open source PHP calendar library

  Sources   Download

MIT

The Requires

 

18/05 2016

v0.0.17

0.0.17.0 http://github.com/CampusUnion/Sked

Open source PHP calendar library

  Sources   Download

MIT

The Requires

  • php >=7.0

 

12/05 2016

v0.0.16

0.0.16.0 http://github.com/CampusUnion/Sked

Open source PHP calendar library

  Sources   Download

MIT

The Requires

  • php >=7.0

 

12/04 2016

v0.0.15

0.0.15.0 http://github.com/CampusUnion/Sked

Open source PHP calendar library

  Sources   Download

MIT

The Requires

  • php >=7.0

 

08/04 2016

v0.0.14

0.0.14.0 http://github.com/CampusUnion/Sked

Open source PHP calendar library

  Sources   Download

MIT

The Requires

  • php >=7.0

 

06/04 2016

v0.0.13

0.0.13.0 http://github.com/CampusUnion/Sked

Open source PHP calendar library

  Sources   Download

MIT

The Requires

  • php >=7.0

 

03/04 2016

v0.0.12

0.0.12.0 http://github.com/CampusUnion/Sked

Open source PHP calendar library

  Sources   Download

MIT

The Requires

  • php >=7.0

 

21/03 2016

v0.0.11

0.0.11.0 http://github.com/CampusUnion/Sked

Open source PHP calendar library

  Sources   Download

MIT

The Requires

  • php >=7.0

 

19/03 2016

v0.0.10

0.0.10.0 http://github.com/CampusUnion/Sked

Open source PHP calendar library

  Sources   Download

MIT

The Requires

  • php >=7.0

 

18/03 2016

v0.0.9

0.0.9.0 http://github.com/CampusUnion/Sked

Open source PHP calendar library

  Sources   Download

MIT

The Requires

  • php >=7.0

 

16/03 2016

v0.0.8

0.0.8.0 http://github.com/CampusUnion/Sked

Open source PHP calendar library

  Sources   Download

MIT

The Requires

  • php >=7.0

 

15/03 2016

v0.0.7

0.0.7.0 http://github.com/CampusUnion/Sked

Open source PHP calendar library

  Sources   Download

MIT

The Requires

  • php >=7.0

 

13/03 2016

v0.0.6

0.0.6.0 http://github.com/CampusUnion/Sked

Open source PHP calendar library

  Sources   Download

MIT

The Requires

  • php >=7.0

 

12/03 2016

v0.0.5

0.0.5.0 http://github.com/CampusUnion/Sked

Open source PHP calendar library

  Sources   Download

MIT

The Requires

  • php >=7.0

 

09/03 2016

v0.0.4

0.0.4.0 http://github.com/CampusUnion/Sked

Open source PHP calendar library

  Sources   Download

MIT

The Requires

  • php >=7.0

 

06/03 2016

v0.0.3

0.0.3.0 http://github.com/CampusUnion/Sked

Open source PHP calendar library

  Sources   Download

MIT

The Requires

  • php >=7.0

 

06/03 2016

v0.0.2

0.0.2.0 http://github.com/CampusUnion/Sked

Open source PHP calendar library

  Sources   Download

MIT

The Requires

  • php >=7.0

 

06/03 2016

v0.0.1

0.0.1.0 http://github.com/CampusUnion/Sked

Open source PHP calendar library

  Sources   Download

MIT

The Requires

  • php >=7.0