[ Index ] |
PHP Cross Reference of Joomla 4.2.2 documentation |
[Summary view] [Print] [Text view]
1 <?php 2 /** 3 * Part of the Joomla Framework Filesystem Package 4 * 5 * @copyright Copyright (C) 2005 - 2021 Open Source Matters, Inc. All rights reserved. 6 * @license GNU General Public License version 2 or later; see LICENSE 7 */ 8 9 namespace Joomla\Filesystem\Support; 10 11 /** 12 * String Controller 13 * 14 * @since 1.0 15 */ 16 class StringController 17 { 18 /** 19 * Internal string references 20 * 21 * @var array 22 * @ssince 1.4.0 23 */ 24 private static $strings = []; 25 26 /** 27 * Defines a variable as an array 28 * 29 * @return array 30 * 31 * @since 1.0 32 * @deprecated 2.0 Use `getArray` instead. 33 */ 34 public static function _getArray() 35 { 36 return self::getArray(); 37 } 38 39 /** 40 * Defines a variable as an array 41 * 42 * @return array 43 * 44 * @since 1.4.0 45 */ 46 public static function getArray() 47 { 48 return self::$strings; 49 } 50 51 /** 52 * Create a reference 53 * 54 * @param string $reference The key 55 * @param string $string The value 56 * 57 * @return void 58 * 59 * @since 1.0 60 */ 61 public static function createRef($reference, &$string) 62 { 63 self::$strings[$reference] = & $string; 64 } 65 66 /** 67 * Get reference 68 * 69 * @param string $reference The key for the reference. 70 * 71 * @return mixed False if not set, reference if it exists 72 * 73 * @since 1.0 74 */ 75 public static function getRef($reference) 76 { 77 if (isset(self::$strings[$reference])) 78 { 79 return self::$strings[$reference]; 80 } 81 82 return false; 83 } 84 }
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 |