Overview

Packages

  • Jonah
  • None

Classes

  • Jonah_Application
  • Jonah_Block_Cloud
  • Jonah_Block_Delivery
  • Jonah_Block_News
  • Jonah_Block_NewsPopular
  • Jonah_Block_Story
  • Jonah_View_Base
  • Jonah_View_DeliveryHtml
  • Overview
  • Package
  • Class
  • Tree
 1: <?php
 2: /*
 3:  * Jonah_View:: class wraps display or the various channel and story views.
 4:  *
 5:  * Copyright 2010-2012 Horde LLC (http://www.horde.org/)
 6:  *
 7:  * See the enclosed file LICENSE for license information (BSD). If you
 8:  * did not receive this file, see http://cvs.horde.org/co.php/jonah/LICENSE
 9:  *
10:  * @author Michael J. Rubinsky <mrubinsk@horde.org>
11:  * @package Jonah
12:  */
13: abstract class Jonah_View_Base
14: {
15:     /**
16:      * Values to include in the view's scope
17:      *
18:      * @var array
19:      */
20:     protected $_params;
21: 
22:     /**
23:      * Const'r
24:      *
25:      * @param array $params  View parameters
26:      */
27:     public function __construct($params = array())
28:     {
29:         $this->_params = $params;
30:     }
31: 
32:     protected function _exit($message)
33:     {
34:         extract($this->_params, EXTR_REFS);
35:         $notification->push(sprintf(_("Error fetching story: %s"), $message), 'horde.error');
36:         require $registry->get('templates', 'horde') . '/common-header.inc';
37:         $notification->notify(array('listeners' => 'status'));
38:         require $registry->get('templates', 'horde') . '/common-footer.inc';
39:         exit;
40:     }
41: 
42:     /**
43:      * Render this view.
44:      *
45:      */
46:     abstract public function run();
47: 
48: }
49: 
50: 
API documentation generated by ApiGen