|
| 1 | +<?php |
| 2 | +/** |
| 3 | + * Shopware 5 |
| 4 | + * Copyright (c) shopware AG |
| 5 | + * |
| 6 | + * According to our dual licensing model, this program can be used either |
| 7 | + * under the terms of the GNU Affero General Public License, version 3, |
| 8 | + * or under a proprietary license. |
| 9 | + * |
| 10 | + * The texts of the GNU Affero General Public License with an additional |
| 11 | + * permission and of our proprietary license can be found at and |
| 12 | + * in the LICENSE file you have received along with this program. |
| 13 | + * |
| 14 | + * This program is distributed in the hope that it will be useful, |
| 15 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 16 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 17 | + * GNU Affero General Public License for more details. |
| 18 | + * |
| 19 | + * "Shopware" is a registered trademark of shopware AG. |
| 20 | + * The licensing of the program under the AGPLv3 does not imply a |
| 21 | + * trademark license. Therefore any rights, title and interest in |
| 22 | + * our trademarks remain entirely with us. |
| 23 | + */ |
| 24 | + |
| 25 | +namespace Shopware\Components\Template; |
| 26 | + |
| 27 | +class Security extends \Smarty_Security |
| 28 | +{ |
| 29 | + public function __construct(\Smarty $smarty, $config = []) |
| 30 | + { |
| 31 | + if (is_array($config)) { |
| 32 | + foreach ($config as $key => $value) { |
| 33 | + if (property_exists($this, $key)) { |
| 34 | + $this->$key = $value; |
| 35 | + } |
| 36 | + } |
| 37 | + } |
| 38 | + |
| 39 | + parent::__construct($smarty); |
| 40 | + } |
| 41 | +} |
0 commit comments