CoreFiles by mySites.guru
redirect.php48 lines, 1,058 bytes, from Joomla_4.2.0-Stable-Full_Package.zip
Raw History Compare with 4.1.5
md5
8df8fbf4f45e3eea641b8be800c24db8
sha1
989b8a0dbd7198ebc64f87ff62f12e41c066bcc9
sha256
59e8784efa5793cd541fcf8c677090099d80f9f08e387ec4f77caa7a640ac527
<?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

 * @phpcs:disable PSR1.Classes.ClassDeclaration.MissingNamespace
 */

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 5 releases, Joomla 4.2.0-beta3 to 4.2.1-rc2. See them all, or every version of this file.