CoreFiles by mySites.guru
PhpSetting.php57 lines, 1,202 bytes, from Joomla_4.2.0-beta3-Beta-Full_Package.zip
Raw History Compare with 4.2.0-beta2
md5
0eb86ae2ebc0a7edbc0d6d168c8439c7
sha1
20957fbb1151f5c9ba18b329b8ee1cfce71560eb
sha256
e5624ded3c85fc71dfe73b263bf753846333a7f4d2a0bb6172826ba828d36903
<?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;

/**
 * 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 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 5 releases, Joomla 4.2.0-beta3 to 4.2.1-rc2. See them all, or every version of this file.