CoreFiles by mySites.guru
installer.php51 lines, 1,175 bytes, from Joomla_4.2.0-Stable-Full_Package.zip
Raw History Compare with 4.1.5
md5
c7f94d5aadcc800b22153d6ef2013af4
sha1
e927a34e6e8044218b8c1a502769cbaa2bb88c1e
sha256
caf2b869005462ce638489b2b406d1491d9806023abaa2d1413316558ec7b6aa
<?php

/**
 * @package     Joomla.Plugin
 * @subpackage  Webservices.Installer
 *
 * @copyright   (C) 2020 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;
use Joomla\Router\Route;

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

    /**
     * Registers com_installer's API's routes in the application
     *
     * @param   ApiRouter  &$router  The API Routing object
     *
     * @return  void
     *
     * @since   4.0.0
     */
    public function onBeforeApiRoute(&$router)
    {
        $defaults    = ['component' => 'com_installer', 'public' => false];

        $routes = [
            new Route(['GET'], 'v1/extensions', 'manage.displayList', [], $defaults),
        ];

        $router->addRoutes($routes);
    }
}

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.