CoreFiles by mySites.guru
helper.php44 lines, 877 bytes, from Joomla_3.4.7-Stable-Full_Package.zip
Raw History Compare with 3.4.6
md5
16cfeea188500e21574dca8d1e6d9871
sha1
f7e87353d9ef41f014fd70f7093f9fbbbc3d96d4
sha256
a5fb319bf615426f4f75063e59c2d0c9175525c06896ba4ba3e2ff63dd748641
<?php
/**
 * @package     Joomla.Site
 * @subpackage  mod_syndicate
 *
 * @copyright   Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * 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 = JArrayHelper::toString($value);

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

The same content is in 20 releases, Joomla 3.4.0-beta1 to 3.5.0-beta. See them all, or every version of this file.