1: <?php
2: /**
3: * Kolab application API.
4: *
5: * This file defines Horde's core API interface. Other core Horde libraries
6: * can interact with Kolab through this API.
7: *
8: * Copyright 2010-2017 Horde LLC (http://www.horde.org/)
9: *
10: * See the enclosed file COPYING for license information (GPL). If you
11: * did not receive this file, see http://www.horde.org/licenses/gpl.
12: *
13: * @package Kolab
14: */
15:
16: /* Determine the base directories. */
17: if (!defined('KOLAB_BASE')) {
18: define('KOLAB_BASE', realpath(__DIR__ . '/..'));
19: }
20:
21: if (!defined('HORDE_BASE')) {
22: /* If Horde does not live directly under the app directory, the HORDE_BASE
23: * constant should be defined in config/horde.local.php. */
24: if (file_exists(KOLAB_BASE . '/config/horde.local.php')) {
25: include KOLAB_BASE . '/config/horde.local.php';
26: } else {
27: define('HORDE_BASE', realpath(KOLAB_BASE . '/..'));
28: }
29: }
30:
31: /* Load the Horde Framework core (needed to autoload
32: * Horde_Registry_Application::). */
33: require_once HORDE_BASE . '/lib/core.php';
34:
35: class Kolab_Application extends Horde_Registry_Application
36: {
37: /**
38: */
39: public $version = 'H5 (0.1-git)';
40:
41: /**
42: * Global variables defined:
43: * - $variable: List all global variables here.
44: */
45: protected function _bootstrap()
46: {
47: $GLOBALS['injector']->bindFactory('Kolab_Driver', 'Kolab_Factory_Driver', 'create');
48: }
49:
50: /**
51: */
52: public function menu($menu)
53: {
54: $menu->add(Horde::url('list.php'), _("List"), 'user.png');
55: }
56: }
57: