CoreFiles by mySites.guru
redirect.php52 lines, 1,165 bytes, from Joomla_4.3.2-Stable-Full_Package.zip
Raw History Compare with 4.3.1
md5
0a32404bde69c9ba37ff306cd0c3aaa7
sha1
681de51a4a49b2fd1f0607d06e4e2c3c52940390
sha256
cb0c2364b5e7cee6490f8138eebd3857b2c0d33b091fa5a0634a021c311a1fb0
<?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;

// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
// phpcs:enable PSR1.Files.SideEffects

/**
 * 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 33 releases, Joomla 4.2.1 to 4.3.4. See them all, or every version of this file.