equal
deleted
inserted
replaced
13 * to license@zend.com so we can send you a copy immediately. |
13 * to license@zend.com so we can send you a copy immediately. |
14 * |
14 * |
15 * @category Zend |
15 * @category Zend |
16 * @package Zend_Application |
16 * @package Zend_Application |
17 * @subpackage Resource |
17 * @subpackage Resource |
18 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) |
18 * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) |
19 * @license http://framework.zend.com/license/new-bsd New BSD License |
19 * @license http://framework.zend.com/license/new-bsd New BSD License |
20 * @version $Id: View.php 22965 2010-09-18 17:45:51Z intiilapa $ |
20 * @version $Id: View.php 24593 2012-01-05 20:35:02Z matthew $ |
21 */ |
21 */ |
22 |
22 |
23 /** |
23 /** |
24 * @see Zend_Application_Resource_ResourceAbstract |
24 * @see Zend_Application_Resource_ResourceAbstract |
25 */ |
25 */ |
31 * |
31 * |
32 * @uses Zend_Application_Resource_ResourceAbstract |
32 * @uses Zend_Application_Resource_ResourceAbstract |
33 * @category Zend |
33 * @category Zend |
34 * @package Zend_Application |
34 * @package Zend_Application |
35 * @subpackage Resource |
35 * @subpackage Resource |
36 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) |
36 * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) |
37 * @license http://framework.zend.com/license/new-bsd New BSD License |
37 * @license http://framework.zend.com/license/new-bsd New BSD License |
38 */ |
38 */ |
39 class Zend_Application_Resource_View extends Zend_Application_Resource_ResourceAbstract |
39 class Zend_Application_Resource_View extends Zend_Application_Resource_ResourceAbstract |
40 { |
40 { |
41 /** |
41 /** |
50 */ |
50 */ |
51 public function init() |
51 public function init() |
52 { |
52 { |
53 $view = $this->getView(); |
53 $view = $this->getView(); |
54 |
54 |
55 $viewRenderer = new Zend_Controller_Action_Helper_ViewRenderer(); |
55 $viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper('viewRenderer'); |
56 $viewRenderer->setView($view); |
56 $viewRenderer->setView($view); |
57 Zend_Controller_Action_HelperBroker::addHelper($viewRenderer); |
|
58 return $view; |
57 return $view; |
59 } |
58 } |
60 |
59 |
61 /** |
60 /** |
62 * Retrieve view object |
61 * Retrieve view object |
76 } |
75 } |
77 } |
76 } |
78 if (isset($options['contentType'])) { |
77 if (isset($options['contentType'])) { |
79 $this->_view->headMeta()->appendHttpEquiv('Content-Type', $options['contentType']); |
78 $this->_view->headMeta()->appendHttpEquiv('Content-Type', $options['contentType']); |
80 } |
79 } |
|
80 if (isset($options['assign']) && is_array($options['assign'])) { |
|
81 $this->_view->assign($options['assign']); |
|
82 } |
81 } |
83 } |
82 return $this->_view; |
84 return $this->_view; |
83 } |
85 } |
84 } |
86 } |