CoreFiles by mySites.guru
StringController.php80 lines, 1,943 bytes, from Joomla_4.4.4-Stable-Full_Package.zip
Raw History Compare with 4.4.3
md5
6b619a5060d4dc602c015a4c5c95f8bf
sha1
57fdf9907753c776e20070ef16143ed8749ad91b
sha256
f84a654e80713a58a464fc9329400ea3ab010eef815778943c532ad5e834e530
<?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
 * @deprecated  4.4 will be removed in 6.0
 *              Use Joomla\Filesystem\Support\StringController instead.
 */
class StringController
{
    /**
     * Defines a variable as an array
     *
     * @return  array
     *
     * @since   1.7.0
     * @deprecated  4.4 will be removed in 6.0
     *              Use Joomla\Filesystem\Support\StringController::getArray() instead.
     */
    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
     * @deprecated  4.4 will be removed in 6.0
     *              Use Joomla\Filesystem\Support\StringController::createRef() instead.
     */
    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
     * @deprecated  4.4 will be removed in 6.0
     *              Use Joomla\Filesystem\Support\StringController::getRef() instead.
     */
    public function getRef($reference)
    {
        $ref = &self::_getArray();

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

The same content is in 37 releases, Joomla 4.4.0-alpha1 to 4.4.14. See them all, or every version of this file.