1: <?php
2: /**
3: * Skeleton application API.
4: *
5: * This file defines Horde's core API interface. Other core Horde libraries
6: * can interact with Skeleton through this API.
7: *
8: * Copyright 2010-2012 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 Skeleton
14: */
15:
16: /* Determine the base directories. */
17: if (!defined('SKELETON_BASE')) {
18: define('SKELETON_BASE', dirname(__FILE__) . '/..');
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(SKELETON_BASE . '/config/horde.local.php')) {
25: include SKELETON_BASE . '/config/horde.local.php';
26: } else {
27: define('HORDE_BASE', SKELETON_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 Skeleton_Application extends Horde_Registry_Application
36: {
37: /**
38: */
39: public $version = 'H4 (0.1-git)';
40:
41: /**
42: * Global variables defined:
43: * - $variable: List all global variables here.
44: */
45: protected function _init()
46: {
47: $GLOBALS['injector']->bindFactory('Skeleton_Driver', 'Skeleton_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: