CoreFiles by mySites.guru
PostinstallHelper.php43 lines, 1,018 bytes, from Joomla_4.3.4-Stable-Full_Package.zip
Raw History Compare with 4.3.3
md5
c57695528b19e0fe5f65b936833ac217
sha1
9bcdd4806bfd5d8e4c07dcba9f02b4373f3858e5
sha256
f87e16a894c1ddbd7b8ee682cf2184d214f92848b2076e5e2136e0d49077c492
<?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 (strpos($path, 'site://') !== false) {
            $path = JPATH_ROOT . str_replace('site://', '/', $path);
        } elseif (strpos($path, 'admin://') !== false) {
            $path = JPATH_ADMINISTRATOR . str_replace('admin://', '/', $path);
        }

        return $path;
    }
}

The same content is in 131 releases, Joomla 4.2.1 to 5.3.0-alpha3. See them all, or every version of this file.