NAME
Helix::Core::Registry - global data storage for Helix Framework.
SYNOPSIS
Somewhere in application controllers:
my $r = Helix::Core::Registry->get_instance;
$r->cgi->send_header;
my $tpl = $r->loader->get_object("Helix::Driver::Template");
$tpl->parse("index.tpl");
$tpl->render;
DESCRIPTION
The Helix::Core::Registry class creates a global data storage object for the whole Helix Framework application. It is instantiated and filled in during applicaton initialization and request processing flow. You can use it anywhere in application.
In Helix Framework documentation examples Helix::Core::Registry is referred as $r
variable.
Mount points
During initialization and request handling application mounts each vital object to system registry to allow other application parts to use them later. This is the list of all mount points, that are created by Helix::Application:
- $r->config
-
Application configuration object (see "Load application configuration" in Helix::Application and Helix::Core::Config module documentation).
- $r->cgi
-
CGI object (see Helix::Core::CGI for more information).
- $r->loader
-
Driver loader object (see Helix::Core::Loader documentation).
METHODS
new()
Class constructor. Creates global data storage.
get_instance()
Returns registry instance. Class must be instantiated first.
free()
Destroys Helix::Core::CGI and Helix::Core::Loader objects.
SEE ALSO
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