CoreFiles by mySites.guru
messages.php47 lines, 919 bytes, from Joomla_4.1.2-Stable-Full_Package.zip
Raw History Compare with 4.1.1
md5
db7b3da0183a955c56d9452b5ece8818
sha1
e1e2bfdc7317f06a567a96373d670984e9a0e2d5
sha256
5973fccd1f57f1bd1fd81b659fc498a88804c82582f61d8497101692940159a5
<?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Webservices.Messages
 *
 * @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_messages.
 *
 * @since  4.0.0
 */
class PlgWebservicesMessages extends CMSPlugin
{
	/**
	 * Load the language file on instantiation.
	 *
	 * @var    boolean
	 * @since  4.0.0
	 */
	protected $autoloadLanguage = true;

	/**
	 * Registers com_messages'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/messages',
			'messages',
			['component' => 'com_messages']
		);
	}
}

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