CoreFiles by mySites.guru
SyndicateHelper.php47 lines, 993 bytes, from Joomla_4.0.0-alpha11-Alpha-Full_Package.zip
Raw History Compare with 4.0.0-alpha10
md5
d65e0b8987b4736a4e9dfad8971b4e59
sha1
fc789bdcc6e87abedb6d91720b7729ffc49398f8
sha256
20f89d05788d504f62d687a451b4afbcfa4b73befb9bd18cf6c24bba7a4bb43a
<?php
/**
 * @package     Joomla.Site
 * @subpackage  mod_syndicate
 *
 * @copyright   Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

namespace Joomla\Module\Syndicate\Site\Helper;

defined('_JEXEC') or die;

use Joomla\CMS\Document\HtmlDocument;
use Joomla\Registry\Registry;
use Joomla\Utilities\ArrayHelper;

/**
 * Helper for mod_syndicate
 *
 * @since  1.5
 */
class SyndicateHelper
{
	/**
	 * Gets the link
	 *
	 * @param   Registry      $params    The module parameters
	 * @param   HtmlDocument  $document  The document
	 *
	 * @return  array  The link as a string
	 *
	 * @since   1.5
	 */
	public static function getLink(Registry $params, HtmlDocument $document)
	{
		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 5 releases, Joomla 4.0.0-alpha7 to 4.0.0-alpha11. See them all, or every version of this file.