| OpenFrame-WebApp documentation | Contained in the OpenFrame-WebApp distribution. |
OpenFrame::WebApp::User::Factory - a factory for creating users
use OpenFrame::WebApp::User::Factory;
my $ufactory = new OpenFrame::WebApp::User::Factory()->type('webapp');
my $user = $ufactory->new_user( @args );
The OpenFrame::WebApp::User::Factory class should be used to create
user objects as needed.
This class inherits its interface from OpenFrame::WebApp::Factory.
It uses OpenFrame::WebApp::User-types()> to resolve class names.
creates a new user of the appropriate type. passes all arguments on to the users constructor.
Steve Purkis <spurkis@epn.nu>
Copyright (c) 2003 Steve Purkis. All rights reserved. Released under the same license as Perl itself.
| OpenFrame-WebApp documentation | Contained in the OpenFrame-WebApp distribution. |
package OpenFrame::WebApp::User::Factory; use strict; use warnings::register; use OpenFrame::WebApp::User; our $VERSION = (split(/ /, '$Revision: 1.3 $'))[1]; use base qw ( OpenFrame::WebApp::Factory ); sub get_types_class { my $self = shift; return OpenFrame::WebApp::User->types->{$self->type}; } sub new_user { my $self = shift; return $self->new_object( @_ ); } 1; __END__