CoreFiles by mySites.guru
helper.php44 lines, 877 bytes, from Joomla_3.5.0-Stable-Full_Package.zip
Raw History Compare with 3.4.8
md5
31542841e331b49c37beb9f6288e252d
sha1
67f6379dd410673882846a8ad94b77a6b7544641
sha256
4bae8ea3fd10471ae05c7cc6c9caa1871fca65a46764353757e0f8291745ca6c
<?php
/**
 * @package     Joomla.Site
 * @subpackage  mod_syndicate
 *
 * @copyright   Copyright (C) 2005 - 2016 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 13 releases, Joomla 3.5.0-beta2 to 3.6.0-alpha. See them all, or every version of this file.