We take care of loading libraries and instantiating objects that every Nag script will need:
<?php
// Horde base libraries require_once HORDE_BASE . '/lib/Horde.php'; require_once HORDE_BASE . '/lib/Auth.php'; require_once HORDE_BASE . '/lib/Text.php'; require_once HORDE_BASE . '/lib/Help.php';
// Nag base library require_once NAG_BASE . '/lib/Nag.php';
// Browser detection library require_once HORDE_BASE . '/lib/Browser.php'; $browser = new Browser();
// Notification sytem require_once HORDE_BASE . '/lib/Notification.php'; $notification = &Notification::singleton(); $notification->attach('status');
?>
- We make use of HORDE_BASE to load the Horde base class, authentication library, text handling library, and the help system. You can add or remove systems as your application requires.
- The browser object is created at the global scope to ensure it is available.
- The notification system is initialized (again, we use a singleton to ensure there is only one), and we register the status listener.
|