- md5
- 515eb937ada6a919453d13f6f1584856
- sha1
- a5a11eb5c20fa8db6dae4bbc27f5a0a5a49f9ab4
- sha256
- af166000b090844e41a0fabc40c4cc724d28297c9310a8a97d6fa3c9328c61b8
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
<?php
/**
* Joomla! Content Management System
*
* @copyright (C) 2008 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
namespace Joomla\CMS\Filesystem\Support;
// phpcs:disable PSR1.Files.SideEffects
\defined('JPATH_PLATFORM') or die;
// phpcs:enable PSR1.Files.SideEffects
/**
* String Controller
*
* @since 1.7.0
*/
class StringController
{
/**
* Defines a variable as an array
*
* @return array
*
* @since 1.7.0
*/
public function _getArray()
{
static $strings = [];
return $strings;
}
/**
* Create a reference
*
* @param string $reference The key
* @param string $string The value
*
* @return void
*
* @since 1.7.0
*/
public function createRef($reference, &$string)
{
$ref = &self::_getArray();
$ref[$reference] = & $string;
}
/**
* Get reference
*
* @param string $reference The key for the reference.
*
* @return mixed False if not set, reference if it exists
*
* @since 1.7.0
*/
public function getRef($reference)
{
$ref = &self::_getArray();
if (isset($ref[$reference])) {
return $ref[$reference];
} else {
return false;
}
}
}
The same content is in 16 releases, Joomla 4.3.0-beta1 to 4.3.4. See them all, or every version of this file.