1Maypole::View::Base(3)User Contributed Perl DocumentationMaypole::View::Base(3)
2
3
4

NAME

6       Maypole::View::Base - Base class for view classes
7

DESCRIPTION

9       This is the base class for Maypole view classes. This is an abstract
10       class that defines the interface, and can't be used directly.
11
12       process
13
14       This is the entry point for the view. It templates the request and
15       returns a "Maypole::Constant" indicate success or failure for the view
16       phase.
17
18       Anyone subclassing this for a different rendering mechanism needs to
19       provide the following methods:
20
21       template
22
23       In this method you do the actual processing of your template. it should
24       use paths to search for components, and provide the templates with easy
25       access to the contents of vars. It should put the result in "$r->out‐
26       put" and return "OK" if processing was sucessfull, or populate
27       "$r->error" and return "ERROR" if it fails.
28

Other overrides

30       Additionally, individual derived model classes may want to override the
31
32       new
33
34       The default constructor does nothing. You can override this to perform
35       actions during view initialization.
36
37       paths
38
39       Returns search paths for templates. the default method returns folders
40       for the model class's "moniker", factory, custom under the configured
41       template root.
42
43       vars
44
45       returns a hash of data the template should have access to. The default
46       one populates classmetadata if there is a table class, as well as set‐
47       ting the data objects by name if there is one or more objects avail‐
48       able.
49
50       error
51
52perl v5.8.8                       2005-11-23            Maypole::View::Base(3)
Impressum