1Maypole::Model::CDBI::DUFsVe(r3)Contributed Perl DocumenMtaaytpioolne::Model::CDBI::DFV(3)
2
3
4

NAME

6       Maypole::Model::CDBI::DFV - Class::DBI::DFV model for Maypole.
7

SYNOPSIS

9           package Foo;
10           use 'Maypole::Application';
11
12           Foo->config->model("Maypole::Model::CDBI::DFV");
13           Foo->setup([qw/ Foo::SomeTable Foo::Other::Table /]);
14
15           # Look ma, no untainting
16
17           sub Foo::SomeTable::SomeAction : Exported {
18
19               . . .
20
21           }
22

DESCRIPTION

24       This module allows you to use Maypole with previously set-up Class::DBI
25       classes that use Class::DBI::DFV;
26
27       Simply call "setup" with a list reference of the classes you're going
28       to use, and Maypole will work out the tables and set up the inheritance
29       relationships as normal.
30
31       Better still, it will also set use your DFV profile to validate input
32       instead of CGI::Untaint. For teh win!!
33

METHODS

35   setup
36         This method is inherited from Maypole::Model::Base and calls setup_database,
37         which uses Class::DBI::Loader to create and load Class::DBI classes from
38         the given database schema.
39
40   setup_database
41         This method loads the model classes for the application
42
43   class_of
44         returns class for given table
45
46   adopt
47       This class method is passed the name of a model class that represensts
48       a table and allows the master model class to do any set-up required.
49
50   check_params
51         Checks parameters against the DFV profile for the class, returns the results
52         of DFV's check.
53
54         my $dfv_results = __PACKAGE__->check_params($r->params);
55

Action Methods

57       Action methods are methods that are accessed through web (or other
58       public) interface.
59
60       Inherited from Maypole::Model::CDBI::Base except do_edit (below)
61
62   do_edit
63       If there is an object in "$r->objects", then it should be edited with
64       the parameters in "$r->params"; otherwise, a new object should be
65       created with those parameters, and put back into "$r->objects".  The
66       template should be changed to "view", or "edit" if there were any
67       errors. A hash of errors will be passed to the template.
68
69   do_delete
70       Inherited from Maypole::Model::CDBI::Base.
71
72       This action deletes records
73
74   do_search
75       Inherited from Maypole::Model::CDBI::Base.
76
77       This action method searches for database records.
78
79   list
80       Inherited from Maypole::Model::CDBI::Base.
81
82       The "list" method fills "$r->objects" with all of the objects in the
83       class. The results are paged using a pager.
84

SEE ALSO

86       Maypole::Model::Base
87
88       Maypole::Model::CDBI::Base
89

AUTHOR

91       Aaron Trevena.
92

LICENSE

94       You may distribute this code under the same terms as Perl itself.
95
96
97
98perl v5.30.1                      2020-01-30      Maypole::Model::CDBI::DFV(3)
Impressum