CoreFiles by mySites.guru
PostinstallHelper.php43 lines, 1,016 bytes, from Joomla_6.2.1-rc1-Release_Candidate-Full_Package.zip
Raw History Compare with 6.2.0-rc2
md5
5fa3b312cc2a4fff9f0fe3b1adc21b4b
sha1
5c7829f022e87e7dd45be40b05b67fb05d2d59c2
sha256
8e591bd06557081407f41b1f655b01b0817f01710174544f3d61bbe5c8b426a5
<?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_starts_with($path, 'site://')) {
            $path = JPATH_ROOT . str_replace('site://', '/', $path);
        } elseif (str_starts_with($path, 'admin://')) {
            $path = JPATH_ADMINISTRATOR . str_replace('admin://', '/', $path);
        }

        return $path;
    }
}

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