File indexing completed on 2024-12-22 05:36:28
0001 <?php 0002 /** 0003 * Zend Framework 0004 * 0005 * LICENSE 0006 * 0007 * This source file is subject to the new BSD license that is bundled 0008 * with this package in the file LICENSE.txt. 0009 * It is also available through the world-wide-web at this URL: 0010 * http://framework.zend.com/license/new-bsd 0011 * If you did not receive a copy of the license and are unable to 0012 * obtain it through the world-wide-web, please send an email 0013 * to license@zend.com so we can send you a copy immediately. 0014 * 0015 * @category Zend 0016 * @package Zend_Application 0017 * @subpackage Resource 0018 * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) 0019 * @license http://framework.zend.com/license/new-bsd New BSD License 0020 * @version $Id$ 0021 */ 0022 0023 /** 0024 * @see Zend_Application_Resource_ResourceAbstract 0025 */ 0026 // require_once 'Zend/Application/Resource/ResourceAbstract.php'; 0027 0028 0029 /** 0030 * Resource for settings Dojo options 0031 * 0032 * @uses Zend_Application_Resource_ResourceAbstract 0033 * @category Zend 0034 * @package Zend_Application 0035 * @subpackage Resource 0036 * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) 0037 * @license http://framework.zend.com/license/new-bsd New BSD License 0038 */ 0039 class Zend_Application_Resource_Dojo 0040 extends Zend_Application_Resource_ResourceAbstract 0041 { 0042 /** 0043 * @var Zend_Dojo_View_Helper_Dojo_Container 0044 */ 0045 protected $_dojo; 0046 0047 /** 0048 * Defined by Zend_Application_Resource_Resource 0049 * 0050 * @return Zend_Dojo_View_Helper_Dojo_Container 0051 */ 0052 public function init() 0053 { 0054 return $this->getDojo(); 0055 } 0056 0057 /** 0058 * Retrieve Dojo View Helper 0059 * 0060 * @return Zend_Dojo_View_Dojo_Container 0061 */ 0062 public function getDojo() 0063 { 0064 if (null === $this->_dojo) { 0065 $this->getBootstrap()->bootstrap('view'); 0066 $view = $this->getBootstrap()->view; 0067 0068 Zend_Dojo::enableView($view); 0069 $view->dojo()->setOptions($this->getOptions()); 0070 0071 $this->_dojo = $view->dojo(); 0072 } 0073 0074 return $this->_dojo; 0075 } 0076 }