CoreFiles by mySites.guru
Stringcontroller.php72 lines, 1,180 bytes, from Joomla_3.9.0-alpha-Alpha-Full_Package.zip
Raw History Compare with 3.7.0-alpha2
md5
9a58b3680f0b274cb0194156f920df09
sha1
8241be80aa2bdee9c6aeb4f0a51b5fadc9ceb9a8
sha256
799723ab7714ad866a632cec2d9eeb0f9b0166a0dd041106861374611bce536b
<?php
/**
 * Joomla! Content Management System
 *
 * @copyright  Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.
 * @license    GNU General Public License version 2 or later; see LICENSE.txt
 */

namespace Joomla\CMS\Filesystem\Support;

defined('JPATH_PLATFORM') or die;

/**
 * String Controller
 *
 * @since  11.1
 */
class StringController
{
	/**
	 * Defines a variable as an array
	 *
	 * @return  array
	 *
	 * @since   11.1
	 */
	public function _getArray()
	{
		static $strings = array();

		return $strings;
	}

	/**
	 * Create a reference
	 *
	 * @param   string  $reference  The key
	 * @param   string  &$string    The value
	 *
	 * @return  void
	 *
	 * @since   11.1
	 */
	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   11.1
	 */
	public function getRef($reference)
	{
		$ref = &self::_getArray();

		if (isset($ref[$reference]))
		{
			return $ref[$reference];
		}
		else
		{
			return false;
		}
	}
}

The same content is in 7 releases, Joomla 3.9.0-alpha to 4.0.0-alpha3. See them all, or every version of this file.