Bric::App::Callback

NAME

Bric::App::Callback - The Bricolage callback base class

SYNOPSIS

use Bric::App::Callback::Foo;
use Bric::App::Callback::Bar;

DESCRIPTION

This is the base class from which all Bricolage callback classes inherit. Callback classes are created by simply subclassing Bric::App::Callback, registering themselves, and then creating callback methods using the Callback attribute on methods:

sub save : Callback {
    my $cb = shift;
    # ...do the saving.
}

See the subclasses for examples.

CLASS INTERFACE

Class Methods

lang

my $lang = Bric::App::Callback->lang;
$lang = $cb->lang;

Returns the currently active Bric::Util::Language localization object. Can also be used as an instance method.

cache

my $cache = Bric::App::Callback->cache;
$cache = $cb->cache;

Returns the currently active Bric::App::Cache object. Can also be used as an instance method.

Instance Methods

set_redirect

$cb->set_redirect($url);

Sets the URL to redirect to after all callbacks have finished executing, but before the request is turned over to Mason for processing.

AUTHOR

Scott Lanning

SEE ALSO

COPYRIGHT AND LICENSE

Copyright (c) 2003-2004 World Health Organization and Kineticode, Inc. See Bric::License for complete license terms and conditions.