[ Index ] |
PHP Cross Reference of phpBB-3.3.14-deutsch |
[Summary view] [Print] [Text view]
1 <?php 2 3 /** 4 * @package s9e\TextFormatter 5 * @copyright Copyright (c) 2010-2022 The s9e authors 6 * @license http://www.opensource.org/licenses/mit-license.php The MIT License 7 */ 8 namespace s9e\TextFormatter\Configurator\JavaScript; 9 10 use s9e\TextFormatter\Configurator\FilterableConfigValue; 11 12 /** 13 * Wrapper used to identify strings that should be treated as JavaScript source code 14 */ 15 class Code implements FilterableConfigValue 16 { 17 /** 18 * @var string JavaScript source code 19 */ 20 public $code; 21 22 /** 23 * Constructor 24 * 25 * @param string $code JavaScript source code 26 */ 27 public function __construct($code) 28 { 29 $this->code = $code; 30 } 31 32 /** 33 * Return this source code 34 * 35 * @return string 36 */ 37 public function __toString() 38 { 39 return (string) $this->code; 40 } 41 42 /** 43 * {@inheritdoc} 44 */ 45 public function filterConfig($target) 46 { 47 return ($target === 'JS') ? $this : null; 48 } 49 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Mon Nov 25 19:05:08 2024 | Cross-referenced by PHPXref 0.7.1 |