equal
deleted
inserted
replaced
12 * obtain it through the world-wide-web, please send an email |
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. |
13 * to license@zend.com so we can send you a copy immediately. |
14 * |
14 * |
15 * @category Zend |
15 * @category Zend |
16 * @package Zend_View |
16 * @package Zend_View |
17 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) |
17 * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) |
18 * @license http://framework.zend.com/license/new-bsd New BSD License |
18 * @license http://framework.zend.com/license/new-bsd New BSD License |
19 * @version $Id: Abstract.php 22446 2010-06-18 12:11:43Z matthew $ |
19 * @version $Id: Abstract.php 24593 2012-01-05 20:35:02Z matthew $ |
20 */ |
20 */ |
21 |
21 |
22 /** @see Zend_Loader */ |
22 /** @see Zend_Loader */ |
23 require_once 'Zend/Loader.php'; |
23 require_once 'Zend/Loader.php'; |
24 |
24 |
31 /** |
31 /** |
32 * Abstract class for Zend_View to help enforce private constructs. |
32 * Abstract class for Zend_View to help enforce private constructs. |
33 * |
33 * |
34 * @category Zend |
34 * @category Zend |
35 * @package Zend_View |
35 * @package Zend_View |
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 abstract class Zend_View_Abstract implements Zend_View_Interface |
39 abstract class Zend_View_Abstract implements Zend_View_Interface |
40 { |
40 { |
41 /** |
41 /** |
219 // LFI protection flag |
219 // LFI protection flag |
220 if (array_key_exists('lfiProtectionOn', $config)) { |
220 if (array_key_exists('lfiProtectionOn', $config)) { |
221 $this->setLfiProtection($config['lfiProtectionOn']); |
221 $this->setLfiProtection($config['lfiProtectionOn']); |
222 } |
222 } |
223 |
223 |
|
224 if (array_key_exists('assign', $config) |
|
225 && is_array($config['assign']) |
|
226 ) { |
|
227 foreach ($config['assign'] as $key => $value) { |
|
228 $this->assign($key, $value); |
|
229 } |
|
230 } |
|
231 |
224 $this->init(); |
232 $this->init(); |
225 } |
233 } |
226 |
234 |
227 /** |
235 /** |
228 * Return the template engine object |
236 * Return the template engine object |
946 } |
954 } |
947 |
955 |
948 /** |
956 /** |
949 * Finds a view script from the available directories. |
957 * Finds a view script from the available directories. |
950 * |
958 * |
951 * @param $name string The base name of the script. |
959 * @param string $name The base name of the script. |
952 * @return void |
960 * @return void |
953 */ |
961 */ |
954 protected function _script($name) |
962 protected function _script($name) |
955 { |
963 { |
956 if ($this->isLfiProtectionOn() && preg_match('#\.\.[\\\/]#', $name)) { |
964 if ($this->isLfiProtectionOn() && preg_match('#\.\.[\\\/]#', $name)) { |