NAME

Mango::Catalyst::Model::Provider - Catalyst::Model/Mango::Provider glue

DESCRIPTION

Mango::Catalyst::Model::Provider provides glue between Mango::Providers and Catalyst models

CONFIGURATION

The following configuration options are used directly by this model:

provider_class

See "provider_class" for more information.

All other configuration options are passed directly into "setup" in Mango::Provider for use by the providers themselves.

METHODS

COMPONENT

Creates an instance of the specified provider class, configures it and returns the new model.

AUTOLOAD

Forwards all method calls to the underlying provider instance.

    my $it = $model->search;
    
    ## same as this, but don't do that
    my $it = $model->provider->search;

provider_class

Arguments: $provider_class

Gets/sets the provider class to be used by the current model.

    $model->provider_class('Mango::Provider::Carts');
    print ref $model->provider;  # Mango::Provider::Carts    

provider

Gets/sets the provider instance to used by the current model.

    my $provider = $model->provider;

If the provider class is specified and no provider instance exists, one will be created automatically using the available configuration.

SEE ALSO

Mango::Provider, Mango::Provider::DBIC

AUTHOR

    Christopher H. Laco
    CPAN ID: CLACO
    claco@chrislaco.com
    http://today.icantfocus.com/blog/