• Main Page
  • Related Pages
  • Namespaces
  • Data Structures
  • Files
  • Examples
  • File List

E:/E/GEAMP/www/openbiz/openbiz/others/Zend/View.php

00001 <?php
00026 require_once 'Zend/View/Abstract.php';
00027 
00028 
00037 class Zend_View extends Zend_View_Abstract
00038 {
00043     private $_useViewStream = false;
00044 
00049     private $_useStreamWrapper = false;
00050 
00059     public function __construct($config = array())
00060     {
00061         $this->_useViewStream = (bool) ini_get('short_open_tag') ? false : true;
00062         if ($this->_useViewStream) {
00063             if (!in_array('zend.view', stream_get_wrappers())) {
00064                 require_once 'Zend/View/Stream.php';
00065                 stream_wrapper_register('zend.view', 'Zend_View_Stream');
00066             }
00067         }
00068 
00069         if (array_key_exists('useStreamWrapper', $config)) {
00070             $this->setUseStreamWrapper($config['useStreamWrapper']);
00071         }
00072 
00073         parent::__construct($config);
00074     }
00075 
00082     public function setUseStreamWrapper($flag)
00083     {
00084         $this->_useStreamWrapper = (bool) $flag;
00085         return $this;
00086     }
00087 
00093     public function useStreamWrapper()
00094     {
00095         return $this->_useStreamWrapper;
00096     }
00097 
00103     protected function _run()
00104     {
00105         if ($this->_useViewStream && $this->useStreamWrapper()) {
00106             include 'zend.view://' . func_get_arg(0);
00107         } else {
00108             include func_get_arg(0);
00109         }
00110     }
00111 }

Generated on Thu Apr 19 2012 17:01:18 for openbiz by  doxygen 1.7.2