The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Konstrukt::Plugin::calendar::DBI - Konstrukt calendar. Backend Driver for the Perl-DBI.

SYNOPSIS

        #TODO

DESCRIPTION

Konstrukt calendar DBI backend driver.

CONFIGURATION

        #backend
        calendar/backend/DBI/source       dbi:mysql:database:host
        calendar/backend/DBI/user         user
        calendar/backend/DBI/pass         pass

If no database settings are set the defaults from "CONFIGURATION" in Konstrukt::DBI will be used.

Note that you have to create the table calendar_event. You may turn on the install setting (see "CONFIGURATION" in Konstrukt::Handler) or use the KonstruktBackendInitialization.pl script to accomplish this task.

METHODS

init

Initialization of this class

install

Installs the backend (e.g. create tables).

Parameters:

none

add_entry

Adds a new bookmark.

Parameters:

  • $year, $month, $day - The date of this entry

  • $start_hour, $start_minute - The start time

  • $end_hour, $end_minute - The ending time

  • $description - What's this event about?

  • $private - Is this entry only visible to the author?

  • $author - The entry's author

get_entry

Returns the requested event as an hash reference with the keys id, year, month, day, start_hour, start_minute, end_hour, end_minute, description, private, author.

Parameters:

  • $id - The id of the event

get_month

Returns the events within a specified month as an array reference of hash references:

        [ { id => .., year => .., month => .., day => ..,
            start_hour => .., start_minute => .., end_hour => .., end_minute => ..,
            description => .., author => .., private => .. },
          { id => .., ... },
          ...
        ]

Parameters:

  • $year, $month - The requested month

get_day

Returns the events within a specified day as an Array reference of hash references:

        [ { id => .., year => .., month => .., day => ..,
            start_hour => .., start_minute => .., end_hour => .., end_minute => ..,
            description => .., author => .., private => .. },
          { id => .., ... },
          ...
        ]

Parameters:

  • $year, $month, $day - The requested day

get_range

Returns the events within a specified date range as an Array reference of hash references:

        [ { id => .., year => .., month => .., day => ..,
            start_hour => .., start_minute => .., end_hour => .., end_minute => ..,
            description => .., author => .., private => .. },
          { id => .., ... },
          ...
        ]

Parameters:

  • $start_year, $start_month, $start_day - Start date

  • $end_year , $end_month , $end_day - End date

get_all

Returns all events as an Array reference of hash references:

        [ { id => .., year => .., month => .., day => ..,
            start_hour => .., start_minute => .., end_hour => .., end_minute => ..,
            description => .., author => .., private => .. },
          { id => .., ... },
          ...
        ]

update_entry

Updates an existing event.

Parameters:

  • $id - The id of the event, which should be updated

  • $year, $month, $day - The date of this entry

  • $start_hour, $start_minute - The start time

  • $end_hour, $end_minute - The ending time

  • $description - What's this event about?

  • $private - Is this entry only visible to the author?

delete_entry

Removes an existing entry.

Parameters:

  • $id - The id of the entry, which should be removed

AUTHOR

Copyright 2006 Thomas Wittek (mail at gedankenkonstrukt dot de). All rights reserved.

This document is free software. It is distributed under the same terms as Perl itself.

SEE ALSO

Konstrukt