CoreFiles by mySites.guru
PostinstallHelper.php43 lines, 878 bytes, from Joomla_4.0.0-alpha6-Alpha-Full_Package.zip
Raw History Compare with 4.0.0-alpha5
md5
50c2b70a137d807ec09c6b63d21fe880
sha1
80bb2da5831d5caecc02dca4ac47fe21090ecebf
sha256
414bbd3252412d434b6680fbbc3f6c28f27aff14690c5b8a337446c2e987bb1c
<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_postinstall
 *
 * @copyright   Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

namespace Joomla\Component\Postinstall\Administrator\Helper;

defined('_JEXEC') or die;

/**
 * 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 3 releases, Joomla 4.0.0-alpha3 to 4.0.0-alpha6. See them all, or every version of this file.