[ 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\Plugins\BBCodes\Configurator; 9 10 use s9e\TextFormatter\Configurator; 11 use s9e\TextFormatter\Configurator\Collections\NormalizedCollection; 12 13 class RepositoryCollection extends NormalizedCollection 14 { 15 /** 16 * @var BBCodeMonkey Instance of BBCodeMonkey passed to new Repository instances 17 */ 18 protected $bbcodeMonkey; 19 20 /** 21 * Constructor 22 * 23 * @param BBCodeMonkey $bbcodeMonkey Instance of BBCodeMonkey used to parse definitions 24 */ 25 public function __construct(BBCodeMonkey $bbcodeMonkey) 26 { 27 $this->bbcodeMonkey = $bbcodeMonkey; 28 } 29 30 /** 31 * Normalize a value for storage 32 * 33 * @param mixed $value Original value 34 * @return Repository Normalized value 35 */ 36 public function normalizeValue($value) 37 { 38 return ($value instanceof Repository) 39 ? $value 40 : new Repository($value, $this->bbcodeMonkey); 41 } 42 }
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 |