1: <?php
2: /**
3: * Copyright 2013-2014 Horde LLC (http://www.horde.org/)
4: *
5: * See the enclosed file COPYING for license information (GPL). If you
6: * did not receive this file, see http://www.horde.org/licenses/gpl.
7: *
8: * @category Horde
9: * @copyright 2013-2014 Horde LLC
10: * @license http://www.horde.org/licenses/gpl GPL
11: * @package IMP
12: */
13:
14: /**
15: * Base class for basic view pages.
16: *
17: * @author Michael Slusarz <slusarz@horde.org>
18: * @category Horde
19: * @copyright 2013-2014 Horde LLC
20: * @license http://www.horde.org/licenses/gpl GPL
21: * @package IMP
22: */
23: abstract class IMP_Basic_Base
24: {
25: /**
26: * @var array
27: */
28: public $header_params = array();
29:
30: /**
31: * @var IMP_Indices_Mailbox
32: */
33: public $indices;
34:
35: /**
36: * @var string
37: */
38: public $output;
39:
40: /**
41: * @var string
42: */
43: public $title;
44:
45: /**
46: * @var Horde_Variables
47: */
48: public $vars;
49:
50: /**
51: */
52: public function __construct(Horde_Variables $vars)
53: {
54: global $page_output;
55:
56: $this->vars = $vars;
57:
58: $this->indices = new IMP_Indices_Mailbox($vars);
59:
60: $page_output->addLinkTag(array(
61: 'href' => IMP_Basic_Search::url(),
62: 'rel' => 'search',
63: 'type' => null
64: ));
65:
66: $mimecss = new Horde_Themes_Element('mime.css');
67: $page_output->addStylesheet($mimecss->fs, $mimecss->uri);
68:
69: $this->_init();
70: }
71:
72: /**
73: */
74: public function render()
75: {
76: echo $this->output;
77: }
78:
79: /**
80: */
81: public function status()
82: {
83: Horde::startBuffer();
84: $GLOBALS['notification']->notify(array(
85: 'listeners' => array('status', 'audio')
86: ));
87: return Horde::endBuffer();
88: }
89:
90: /**
91: */
92: abstract protected function _init();
93:
94: /**
95: */
96: public static function url(array $opts = array())
97: {
98: }
99:
100: }
101: