CoreFiles by mySites.guru
PostinstallHelper.php43 lines, 1,010 bytes, from Joomla_5.3.0-beta1-Beta-Full_Package.zip
Raw History Compare with 5.2.0-beta3
md5
19141e370f51577f06375e591854e179
sha1
496b40bb421d1df6b756f6e6613c15032a82a21d
sha256
557c941a2ebe7856266fa11e5e176f5b5502acfc4bef35820b06843810ad16e6
<?php

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

namespace Joomla\Component\Postinstall\Administrator\Helper;

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

/**
 * Helper class for postinstall messages
 *
 * @since  3.6
 */
class PostinstallHelper
{
    /**
     * Method for parsing ini files.
     *
     * @param   string  $path  Fancy path.
     *
     * @return  string  Parsed path.
     *
     * @since   3.6
     */
    public function parsePath($path)
    {
        if (str_contains($path, 'site://')) {
            $path = JPATH_ROOT . str_replace('site://', '/', $path);
        } elseif (str_contains($path, 'admin://')) {
            $path = JPATH_ADMINISTRATOR . str_replace('admin://', '/', $path);
        }

        return $path;
    }
}

No other release has this exact content. See every version of this file.