The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Helix::Driver::Router - Helix Framework generic router driver.

SYNOPSIS

Example router driver:

    package MyApp::Driver::Router;
    use base qw/Helix::Driver::Router/;

    sub find_handler
    {
        my $self = shift;

        # ...

        if (!$handler_found)
            throw HXError::Driver::Router::NotFound;
        
        $self->{"handler"} = ...;
        $self->{"params"}  = ...;
    }

DESCRIPTION

The Helix::Driver::Router is a generic router driver for Helix Framework. It declares some basic functions that are common for all driver types and one abstract method, that must be overloaded in ancestor classes. All router drivers should subclass this package.

METHODS

new()

Class constructor.

find_handler()

Finds a query handler. Abstract method, should be overloaded by the ancestor class.

get_handler()

Returns a reference to the query handler subroutine.

get_params()

Returns a reference to the array of query handler parameters.

SEE ALSO

Helix, Helix::Application, Helix::Driver::Router::Exceptions

LICENSE

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

AUTHOR

Anton Belousov, <abel@cpan.org>

COPYRIGHT

Copyright (c) 2009, Atma 7, http://www.atma7.com