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