CoreFiles by mySites.guru
redirect.php47 lines, 922 bytes, from Joomla_4.1.2-Stable-Full_Package.zip
Raw History Compare with 4.1.1
md5
6a7fc95f75e04e0c3fb1e835c8465c4a
sha1
3ba262aa54965d90565cb3764e4aafc737dc5bc7
sha256
accedb271cf1b3550a80f94ecc01f470c7777004ae9b076242ed49ab2d8b4de4
<?php
/**
 * @package     Joomla.Redirect
 * @subpackage  Webservices.Redirect
 *
 * @copyright   (C) 2019 Open Source Matters, Inc. <https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

defined('_JEXEC') or die;

use Joomla\CMS\Plugin\CMSPlugin;
use Joomla\CMS\Router\ApiRouter;

/**
 * Web Services adapter for com_redirect.
 *
 * @since  4.0.0
 */
class PlgWebservicesRedirect extends CMSPlugin
{
	/**
	 * Load the language file on instantiation.
	 *
	 * @var    boolean
	 * @since  4.0.0
	 */
	protected $autoloadLanguage = true;

	/**
	 * Registers com_redirect's API's routes in the application
	 *
	 * @param   ApiRouter  &$router  The API Routing object
	 *
	 * @return  void
	 *
	 * @since   4.0.0
	 */
	public function onBeforeApiRoute(&$router)
	{
		$router->createCRUDRoutes(
			'v1/redirects',
			'redirect',
			['component' => 'com_redirect']
		);
	}
}

The same content is in 49 releases, Joomla 4.0.0-rc1 to 4.2.0-beta2. See them all, or every version of this file.