CoreFiles by mySites.guru
helper.php46 lines, 908 bytes, from Joomla_3.7.4-Stable-Full_Package.zip
Raw History Compare with 3.7.3
md5
589d80d150f453c0edd0815377f493af
sha1
108b2502710a2aa7b7da9b2145e6e33651251558
sha256
35c004f04620c0b1fa8e4e90be82682218f6b287100010410345cd08c0daa209
<?php
/**
 * @package     Joomla.Site
 * @subpackage  mod_syndicate
 *
 * @copyright   Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

defined('_JEXEC') or die;

use Joomla\Utilities\ArrayHelper;

/**
 * Helper for mod_syndicate
 *
 * @package     Joomla.Site
 * @subpackage  mod_syndicate
 * @since       1.5
 */
class ModSyndicateHelper
{
	/**
	 * Gets the link
	 *
	 * @param   \Joomla\Registry\Registry  &$params  module parameters
	 *
	 * @return  array  The link as a string
	 *
	 * @since   1.5
	 */
	public static function getLink(&$params)
	{
		$document = JFactory::getDocument();

		foreach ($document->_links as $link => $value)
		{
			$value = ArrayHelper::toString($value);

			if (strpos($value, 'application/' . $params->get('format') . '+xml'))
			{
				return $link;
			}
		}
	}
}

The same content is in 23 releases, Joomla 3.7.0-alpha2 to 3.8.0-beta1. See them all, or every version of this file.