The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

ePortal::Application - The base class for ePortal applications.

SYNOPSIS

An application is registered with ePortal via parameter

 application ePortal::App:ApplicationName

To create an application derive it from ePortal::Application and register in ePortal.conf.

INITIALIZATION

During Apache's startup phase an application object will be created and initialized.

  new()
  initialize_config() (overwrite it)
    read [common:ApplicationName] (by ePortal::Application)
    read [vhost:ApplicationName] (by ePortal::Application)
  initialize() (overwrite it)
    create DBISource if needed (by ePortal::Application)
    create sysacl if needed
    create user groups if needed
  ?????
  register PageView sections
  register cron events
  register database upgrade script

DATABASE ACCESS

ePortal::Application registers in initialize_config() three parameters for you: dbi_source, dbi_user, dbi_password. During initialize() a DBISource object will be create with a name of ApplicationName().

Use this new DBISource as the follows:

 my $obj = new ePortal::ThePersistent::Support("SQL", undef, "ApplicationName");
 my $obj = new ePortal::ThePersistent::Support($attributes, "table_name", "ApplicationName");
 # here ApplicationName is a name of DBISource object.

SECURITY

METHODS

ApplicationName

You should overwrite this method to supply your own application name. By default a last part of application's package name is used.

new($config)

Application constructor. Should be never overwrited. Use Initialize_xxx methods if you need an extra initialization.

initialize()

This is application initializer. By default initialize() creates new DBISource if any of dbi_xxx parameters are meet in config file.

onDeleteUser,onDeleteGroup

This is callback function. Do not call it directly. It is called from ePortal::Server. Overload it in your application package to remove user or group specific data.

Parameters:

  • username or groupname

    User or Group name to delete.