[ Index ] |
PHP Cross Reference of Joomla 4.2.2 documentation |
[Summary view] [Print] [Text view]
1 <?php 2 3 /** 4 * Joomla! Content Management System 5 * 6 * @copyright (C) 2008 Open Source Matters, Inc. <https://www.joomla.org> 7 * @license GNU General Public License version 2 or later; see LICENSE.txt 8 */ 9 10 namespace Joomla\CMS\Filesystem\Support; 11 12 // phpcs:disable PSR1.Files.SideEffects 13 \defined('JPATH_PLATFORM') or die; 14 // phpcs:enable PSR1.Files.SideEffects 15 16 /** 17 * String Controller 18 * 19 * @since 1.7.0 20 */ 21 class StringController 22 { 23 /** 24 * Defines a variable as an array 25 * 26 * @return array 27 * 28 * @since 1.7.0 29 */ 30 public function _getArray() 31 { 32 static $strings = array(); 33 34 return $strings; 35 } 36 37 /** 38 * Create a reference 39 * 40 * @param string $reference The key 41 * @param string $string The value 42 * 43 * @return void 44 * 45 * @since 1.7.0 46 */ 47 public function createRef($reference, &$string) 48 { 49 $ref = &self::_getArray(); 50 $ref[$reference] = & $string; 51 } 52 53 /** 54 * Get reference 55 * 56 * @param string $reference The key for the reference. 57 * 58 * @return mixed False if not set, reference if it exists 59 * 60 * @since 1.7.0 61 */ 62 public function getRef($reference) 63 { 64 $ref = &self::_getArray(); 65 66 if (isset($ref[$reference])) { 67 return $ref[$reference]; 68 } else { 69 return false; 70 } 71 } 72 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Wed Sep 7 05:41:13 2022 | Chilli.vc Blog - For Webmaster,Blog-Writer,System Admin and Domainer |