source: LATMOS-Accounts-Web/lib/LATMOS/Accounts/Web/Model/Accounts.pm @ 180

Last change on this file since 180 was 180, checked in by nanardon, 15 years ago
  • synchronise immediatelly modified object
File size: 934 bytes
Line 
1package LATMOS::Accounts::Web::Model::Accounts;
2
3use strict;
4use warnings;
5use FindBin;
6use lib "$FindBin::Bin/../../LATMOS-Accounts/lib";
7use base 'Catalyst::Model';
8use LATMOS::Accounts;
9
10=head1 NAME
11
12LATMOS::Accounts::Web::Model::Accounts - Catalyst Model
13
14=head1 DESCRIPTION
15
16Catalyst Model.
17
18=cut
19
20sub new {
21    my ($class) = @_;
22    bless({}, $class);
23}
24
25sub accounts {
26    my ($self) = @_;
27    LATMOS::Accounts
28        ->new(LATMOS::Accounts::Web->config->{config})
29}
30
31sub db {
32    my ($self) = @_;
33    my $base = $self->accounts
34        ->default_base;
35    $base->{wexported} = 1;
36    $base
37}
38
39sub sync_access {
40    my ($self) = @_;
41    $self->accounts
42        ->sync_access
43}
44
45sub sync {
46    my ($self) = @_;
47    $self->accounts
48        ->default_synchro
49}
50
51=head1 AUTHOR
52
53Thauvin Olivier
54
55=head1 LICENSE
56
57This library is free software, you can redistribute it and/or modify
58it under the same terms as Perl itself.
59
60=cut
61
621;
Note: See TracBrowser for help on using the repository browser.