CoreFiles by mySites.guru
PhpSetting.php73 lines, 1,581 bytes, from Joomla_6.2.0-beta2-Beta-Full_Package.zip
Raw History Compare with 6.2.0-beta1
md5
19340312162b497e520bea4bb4a0188e
sha1
ed6bbfd2e21616f8f6a7bfed763842ab1c2deb41
sha256
2fbb5526cc6e54ce4a47c63a9149733f7a7b7a0f9889b55f6b1700f7690501d7
<?php

/**
 * @package     Joomla.Administrator
 * @subpackage  com_admin
 *
 * @copyright   (C) 2009 Open Source Matters, Inc. <https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

namespace Joomla\Component\Admin\Administrator\Service\HTML;

use Joomla\CMS\Language\Text;

// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
// phpcs:enable PSR1.Files.SideEffects

/**
 * Utility class working with phpsetting
 *
 * @since  1.6
 */
class PhpSetting
{
    /**
     * Method to generate a boolean message for a value
     *
     * @param   boolean  $val  is the value set?
     *
     * @return  string html code
     */
    public function boolean($val)
    {
        return Text::_($val ? 'JON' : 'JOFF');
    }

    /**
     * Method to generate a boolean message for a value
     *
     * @param   boolean  $val  is the value set?
     *
     * @return  string html code
     */
    public function set($val)
    {
        return Text::_($val ? 'JYES' : 'JNO');
    }

    /**
     * Method to generate a boolean message for a value
     *
     * @param   boolean  $val  is the value set?
     *
     * @return  string html code
     */
    public function enabled($val)
    {
        return Text::_($val ? 'JENABLED' : 'JDISABLED');
    }

    /**
     * Method to generate a string message for a value
     *
     * @param   string  $val  a php ini value
     *
     * @return  string html code
     */
    public function string($val)
    {
        return !empty($val) ? $val : Text::_('JNONE');
    }
}

The same content is in 39 releases, Joomla 6.0.1-rc1 to 6.2.1-rc1. See them all, or every version of this file.