|
P5EEx-Blue-0.01 | |||||||
| PREV NEXT | FRAMES NO FRAMES | |||||||
![]() |
P5EEx::Blue::Context::HTML |
P5EEx::Blue::Context::HTML - A base class for contexts that serve up HTML (CGI, Modperl, etc.)
# ... official way to get a Context object ... use P5EEx::Blue::P5EE; $context = P5EEx::Blue::P5EE->context(); $config = $context->config(); # get the configuration $config->dispatch_events(); # dispatch events
# ... alternative way (used internally) ... use P5EEx::Blue::Context::CGI; $context = P5EEx::Blue::Context::CGI->new();
This is a base class for contexts that serve up HTML (CGI, Modperl, etc.). It should never be instantiated for direct use.
A Context class models the environment (aka ``context) in which the current process is running. There are many things in common between the various contexts that serve web browsers via HTML. This class provides those things.
The Context object is a singleton per process.
These methods are considered protected because no class is ever supposed to call them. They may however be called by the context-specific drivers.
display_current_widget()
* Signature: $context->display_current_widget()
* Param: void
* Return: void
* Throws: P5EEx::Blue::Exception
* Since: 0.01
Sample Usage:
$context->display_current_widget();
The display_current_widget() method searches the ``session widget'' for an
attribute of ``current_widget'' and uses that as the name of the widget which should
be displayed in the browser.
display_items()The display_items() method takes an array of arguments and puts them all
out to STDOUT with the appropriate headers.
* Signature: $context->display_items(@items)
* Param: @items @
* Return: void
* Throws: P5EEx::Blue::Exception
* Since: 0.01
Sample Usage:
$context->display_items("Hello world!");