XAO::Projects - project context switcher for XAO


XAO-Base documentation  | view source Contained in the XAO-Base distribution.

Index


NAME

Top

XAO::Projects - project context switcher for XAO

SYNOPSIS

Top

 use XAO::SimpleHash;
 use XAO::Projects;

 my $fubar=new XAO::SimpleHash foo => 'bar';
 XAO::Projects::create_project(fubar => $fubar);
 XAO::Projects::set_current_project('fubar');

 ...

 ##
 # Probably in different module..
 #
 my $pd=XAO::Projects::get_current_project();

DESCRIPTION

Top

XXX: Need to be proof read - left from Symphero::SiteConfig

This object holds all site-specific configuration values and provides various useful methods that are not related to any particular displayable object (see XAO::Objects::Page).

In mod_perl context this object is initialized only once for each apache process and then is re-used every time until that process die. SiteConfig keeps a cache of all site configurations and makes them available on demand. It is perfectly fine that one apache process would serve more then one site, they won't step on each other toes.

UTILITY FUNCTIONS

Top

XAO::SiteConfig provides some utility functions that do not require any configuration object context.

create_project (%)

XXX

drop_project ($)

XXX

get_current_project ()

XXX

get_current_project_name ()

XXX

get_project ($)

Looks into pre-initialized configurations list and returns object if found or undef if not.

Example:

 my $cf=XAO::Projects->get_projects('testsite');

set_current_project ($)

XXX

EXPORTS

Top

Nothing by default. Use `:all' tag to import everything.

AUTHOR

Top

XAO, Inc.: Andrew Maltsev <am@xao.com>.

SEE ALSO

Top

Have a look at XAO::Base for the general overview.


XAO-Base documentation  | view source Contained in the XAO-Base distribution.