*prechod na novsiu verziu ZF
[sport-group.git] / library / Zend / Application / Resource / View.php
blobee3d8d0f17209db606e4c67f10a7a9b1430be3d2
1 <?php
2 /**
3 * Zend Framework
5 * LICENSE
7 * This source file is subject to the new BSD license that is bundled
8 * with this package in the file LICENSE.txt.
9 * It is also available through the world-wide-web at this URL:
10 * http://framework.zend.com/license/new-bsd
11 * If you did not receive a copy of the license and are unable to
12 * obtain it through the world-wide-web, please send an email
13 * to license@zend.com so we can send you a copy immediately.
15 * @category Zend
16 * @package Zend_Application
17 * @subpackage Resource
18 * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
19 * @license http://framework.zend.com/license/new-bsd New BSD License
20 * @version $Id: View.php 16200 2009-06-21 18:50:06Z thomas $
23 /**
24 * Resource for settings view options
26 * @uses Zend_Application_Resource_ResourceAbstract
27 * @category Zend
28 * @package Zend_Application
29 * @subpackage Resource
30 * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
31 * @license http://framework.zend.com/license/new-bsd New BSD License
33 class Zend_Application_Resource_View extends Zend_Application_Resource_ResourceAbstract
35 /**
36 * @var Zend_View_Interface
38 protected $_view;
40 /**
41 * Defined by Zend_Application_Resource_Resource
43 * @return Zend_View
45 public function init()
47 $view = $this->getView();
49 $viewRenderer = new Zend_Controller_Action_Helper_ViewRenderer();
50 $viewRenderer->setView($view);
51 Zend_Controller_Action_HelperBroker::addHelper($viewRenderer);
52 return $view;
55 /**
56 * Retrieve view object
58 * @return Zend_View
60 public function getView()
62 if (null === $this->_view) {
63 $this->_view = new Zend_View($this->getOptions());
65 return $this->_view;