NAME
Konstrukt::Plugin::guestbook::DBI - Konstrukt guestbook. Backend Driver for the Perl-DBI.
SYNOPSIS
#TODO
DESCRIPTION
Konstrukt guestbook DBI backend driver.
CONFIGURATION
Note that you have to create the table guest
. You may turn on the install
setting (see "CONFIGURATION" in Konstrukt::Handler) or use the KonstruktBackendInitialization.pl
script to accomplish this task.
You have to define those settings to use this backend:
#backend
guestbook/backend/DBI/source dbi:mysql:database:host
guestbook/backend/DBI/user user
guestbook/backend/DBI/pass pass
If no database settings are set the defaults from "CONFIGURATION" in Konstrukt::DBI will be used.
METHODS
init
Initialization of this class
install
Installs the backend (e.g. create tables).
Parameters:
none
get_entries_count
Returns the count of the entries in the guestbook.
get_entries
Returns the requested entries in the database as an arrayreference of hashreferences:
[
{id => <value>, title => <value>, ...},
{id => <value>, title => <value>, ...},
...
]
Parameters:
$start - The first entry to display. starts with 0
$count - The number of entries to display
get_entry
Returns one single entry specified by it's ID as an hashreference:
{id => <value>, title => <value>, ...}
Parameters:
$id - The entry's id
add_entry
Creates a guestbook entry.
Parameters:
$name - Author
$email - Author's e-mail address
$icq - ICQ IM account
$aim - AIM account
$yahoo - Yahoo! IM account
$jabber - Jabber IM account
$msn - MSN IM account
$homepage - The authors website
$text - The entry's text
$host - Client Computer's IP/Hostname
delete_entry
Removes a guestbook entry
Parameters:
$id - The entry's id
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.