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

NAME

Konstrukt::Plugin::hitstats::DBI - Konstrukt page hit logging. DBI backend

SYNOPSIS

        #TODO

DESCRIPTION

Konstrukt page hit logging. DBI backend

CONFIGURATION

Note that you have to create a table called hitstats. 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
        hitstats/backend                  DBI
        hitstats/backend/DBI/source       dbi:mysql:database:host
        hitstats/backend/DBI/user         user
        hitstats/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

Parameters: none

install

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

Parameters:

none

hit

Adds a new hitstat entry.

Parameters:

  • $title - The title of the page to log

  • $aggregate - The range over which the hits should be aggregated. May be all, year, month and day.

get

Returns the statistics as an array reference of hash references: [ { title => <value>, date => <value>, count => <value> }, ... ]

Parameters:

  • $aggregate - The range over which the hits should be aggregated. May be all, year, month and day.

  • $limit - Max. number of returned entries.

get_count

Returns the overall hit count for a given page

Parameters:

  • $title - The title of the page

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::Plugin::hitstats, Konstrukt