added the quick() convenience method

This commit is contained in:
JT Smith 2006-05-18 02:02:49 +00:00
parent 61050f1aed
commit f567d54b14
2 changed files with 24 additions and 3 deletions

View file

@ -30,6 +30,7 @@
- Fixed a problem where last reply column wasn't being updated in the thread.
- fix [ 1488556 ] blank page after setup
- fix [ 1489528 ] HTTP header contains invalid time-stamp
- Added the quick() convenience method to WebGUI::Session.
6.99.0

View file

@ -53,10 +53,10 @@ B<NOTE:> It is important to distinguish the difference between a WebGUI session
$session = WebGUI::Session->open($webguiRoot, $configFile);
$sessionId = $session->getId;
($form, $db, $user) = $session->quick("form", "db", "user");
$session->close;
$session->asset
$session->close
$session->config
$session->datetime
$session->db
@ -64,11 +64,9 @@ B<NOTE:> It is important to distinguish the difference between a WebGUI session
$session->env
$session->errorHandler
$session->form
$session->getId
$session->http
$session->icon
$session->id
$session->open
$session->output
$session->os
$session->privilege
@ -432,6 +430,28 @@ sub privilege {
#-------------------------------------------------------------------
=head2 quick ( methods )
A convenience method that returns a list of object references.
=head3 methods
An array of method names of the objects you want returned.
=cut
sub quick {
my $self = shift;
my @methods = shift;
my @list = ();
foreach my $method (@methods) {
push(@list, $self->$method);
}
return @list;
}
#-------------------------------------------------------------------
=head2 request ( )
Returns the Apache request (aka $r) object, or undef if it doesn't exist.