Solstice::NamespaceService - Used by the framework to discover the configuration namespace of the app it is currently running.


Solstice documentation Contained in the Solstice distribution.

Index


Code Index:

NAME

Top

Solstice::NamespaceService - Used by the framework to discover the configuration namespace of the app it is currently running.

SYNOPSIS

Top

    #in the main handler, this is initialized:
    my $ns_service = Solstice::NamespaceService->new();
    $ns_service->_setAppNamespace('WEBQ');

    #later, when checking whether the boilerplate/css file is overridden:
    my $ns_service = Solstice::NamespaceService->new();
    my $config = Solstice::Configure->new($ns_service->getAppNamespace());

    if(defined $config->getBoilerplateTemplate()){
        #override the default
    }




Superclass

Solstice::Service

Export

No symbols exported.

Methods

new()

Creates a new Solstice::NamespaceService object.

getNamespace()

synonym for getAppNamespace

getAppNamespace()

Return the application namespace.

Private Methods

_setAppNamespace($namespace)
_getClassName()

Return the class name. Overridden to avoid a ref() in the superclass.

Modules Used

Solstice::Service.

AUTHOR

Top

Catalyst Group, <catalyst@u.washington.edu>

VERSION

Top

$Revision: 2940 $

COPYRIGHT

Top


Solstice documentation Contained in the Solstice distribution.
package Solstice::NamespaceService;

use strict;
use warnings;
use 5.006_000;

use base qw(Solstice::Service);

sub new {
    my $obj = shift;
    my $self = $obj->SUPER::new(@_);
    return $self;
}

sub getNamespace {
    my $self = shift;
    return $self->get('_app_namespace');
}

sub getAppNamespace {
    my $self = shift;
    return $self->get('_app_namespace');
}

sub _setAppNamespace {
    my $self = shift;
    my $namespace = shift;
    $self->set('_app_namespace', $namespace);
    return 1;
}

#sub _getClassName {
#    return 'Solstice::NamespaceService';
#}


1;
__END__