CoreFiles by mySites.guru
redirect.php47 lines, 921 bytes, from Joomla_4.0.0-beta6-Beta-Full_Package.zip
Raw History Compare with 4.0.0-beta5
md5
2ae2e703e76d9c03226e7dae14a7a73b
sha1
3493f6b50d1065a801f8691a4a0a0db9dcdb8c8f
sha256
3380685c187d585e98921af44a77064f3b645dbc624c4a0f34422b6f49d9be43
<?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/redirect',
			'redirect',
			['component' => 'com_redirect']
		);
	}
}

The same content is in 2 releases, Joomla 4.0.0-beta6 to 4.0.0-beta7. See them all, or every version of this file.