1Catalyst::Dispatcher(3)User Contributed Perl DocumentatioCnatalyst::Dispatcher(3)
2
3
4

NAME

6       Catalyst::Dispatcher - The Catalyst Dispatcher
7

SYNOPSIS

9       See Catalyst.
10

DESCRIPTION

12       This is the class that maps public urls to actions in your Catalyst
13       application based on the attributes you set.
14

METHODS

16   new
17       Construct a new dispatcher.
18
19   $self->preload_dispatch_types
20       An arrayref of pre-loaded dispatchtype classes
21
22       Entries are considered to be available as
23       "Catalyst::DispatchType::CLASS" To use a custom class outside the
24       regular "Catalyst" namespace, prefix it with a "+", like so:
25
26           +My::Dispatch::Type
27
28   $self->postload_dispatch_types
29       An arrayref of post-loaded dispatchtype classes
30
31       Entries are considered to be available as
32       "Catalyst::DispatchType::CLASS" To use a custom class outside the
33       regular "Catalyst" namespace, prefix it with a "+", like so:
34
35           +My::Dispatch::Type
36
37   $self->dispatch($c)
38       Delegate the dispatch to the action that matched the url, or return a
39       message about unknown resource
40
41   $self->visit( $c, $command [, \@arguments ] )
42       Documented in Catalyst
43
44   $self->go( $c, $command [, \@arguments ] )
45       Documented in Catalyst
46
47   $self->forward( $c, $command [, \@arguments ] )
48       Documented in Catalyst
49
50   $self->detach( $c, $command [, \@arguments ] )
51       Documented in Catalyst
52
53   $self->prepare_action($c)
54       Find an dispatch type that matches $c->req->path, and set args from it.
55
56   $self->get_action( $action, $namespace )
57       returns a named action from a given namespace.
58
59   $self->get_action_by_path( $path );
60       Returns the named action by its full private path.
61
62   $self->get_actions( $c, $action, $namespace )
63   $self->get_containers( $namespace )
64       Return all the action containers for a given namespace, inclusive
65
66   $self->uri_for_action($action, \@captures)
67       Takes a Catalyst::Action object and action parameters and returns a URI
68       part such that if $c->req->path were this URI part, this action would
69       be dispatched to with $c->req->captures set to the supplied arrayref.
70
71       If the action object is not available for external dispatch or the
72       dispatcher cannot determine an appropriate URI, this method will return
73       undef.
74
75   expand_action
76       expand an action into a full representation of the dispatch.  mostly
77       useful for chained, other actions will just return a single action.
78
79   $self->register( $c, $action )
80       Make sure all required dispatch types for this action are loaded, then
81       pass the action to our dispatch types so they can register it if
82       required.  Also, set up the tree with the action containers.
83
84   $self->setup_actions( $class, $context )
85       Loads all of the preload dispatch types, registers their actions and
86       then loads all of the postload dispatch types, and iterates over the
87       tree of actions, displaying the debug information if appropriate.
88
89   $self->dispatch_type( $type )
90       Get the DispatchType object of the relevant type, i.e. passing $type of
91       "Chained" would return a Catalyst::DispatchType::Chained object
92       (assuming of course it's being used.)
93
94   meta
95       Provided by Moose
96

AUTHORS

98       Catalyst Contributors, see Catalyst.pm
99
101       This library is free software. You can redistribute it and/or modify it
102       under the same terms as Perl itself.
103
104
105
106perl v5.12.1                      2010-01-09           Catalyst::Dispatcher(3)
Impressum