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 layout 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_Layout 0040 extends Zend_Application_Resource_ResourceAbstract 0041 { 0042 /** 0043 * @var Zend_Layout 0044 */ 0045 protected $_layout; 0046 0047 /** 0048 * Defined by Zend_Application_Resource_Resource 0049 * 0050 * @return Zend_Layout 0051 */ 0052 public function init() 0053 { 0054 $this->getBootstrap()->bootstrap('FrontController'); 0055 return $this->getLayout(); 0056 } 0057 0058 /** 0059 * Retrieve layout object 0060 * 0061 * @return Zend_Layout 0062 */ 0063 public function getLayout() 0064 { 0065 if (null === $this->_layout) { 0066 $this->_layout = Zend_Layout::startMvc($this->getOptions()); 0067 } 0068 return $this->_layout; 0069 } 0070 }