NAME
Egg::Plugin::SessionKit::DBI - Egg::Model::DBI for session.
SYNOPSIS
use Egg qw/ DBI::Transaction SessionKit /;
__PACKAGE__->egg_startup(
.......
...
MODEL => [ [ DBI => { ... } ] ],
plugin_session => {
key_name => 'ss',
component=> [
[ 'Base::DBI' => {
dbname => 'sessions',
data_field => 'a_session',
time_field => 'lastmod',
} ],
qw/ Bind::Cookie Store::Base64 /,
],
},
);
DESCRIPTION
The session by Egg::Model::DBI is supported.
It is necessary to load Egg::Plugin::DBI::Transaction.
Please make the table for the following sessions for the data base used.
CREATE TABLE sessions (
id char(32) primary key,
lastmod timestamp,
a_session text
);
* It is not forgotten to set an appropriate authority.
* Please set Egg::Plugin::SessionKit::Store::Base64 to the Store module.
* The function to clear the data not used is not included. Separately, it is necessary to delete it with cron etc. regularly.
CONFIGRATION
dbname
Name of table for session used.
Default is 'sessions'.
data_field
Name of column that stores session data.
Default is 'a_session'.
time_field
Name of column that stores updated day and hour.
Default is 'lastmod'.
METHODS
startup
The setting is checked.
dbh
The data base handler is returned.
restore ( [SESSION_ID] )
The session data is acquired.
insert
New session data is added.
update
Existing session data is updated.
delete ( [SESSION_ID] )
The data of SESSION_ID is deleted.
clear_sessions ( [TIME] )
The session data before TIME is deleted.
commit_ok
Accessor to $e->commit_ok.
close
Rollback is set if there are signs where some errors occurred before shutting the session.
SEE ALSO
Egg::Model::DBI, Egg::Plugin::SessionKit, Egg::Release,
AUTHOR
Masatoshi Mizuno <lushe@cpan.org>
COPYRIGHT
Copyright (C) 2007 by Bee Flag, Corp. <http://egg.bomcity.com/>, All Rights Reserved.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.6 or, at your option, any later version of Perl 5 you may have available.