CoreFiles by mySites.guru
ModuleDispatcher.php49 lines, 958 bytes, from Joomla_4.0.0-alpha12-Alpha-Full_Package.zip
Raw History Compare with 4.0.0-alpha11
md5
c55b61164f2e21bbb324dc2dc5173f90
sha1
57950f614e7dd7277e3a139563fcf516385eaec7
sha256
c04afcf5ee0b0e41f243957fe2ae0433e521469f793fda2f7bb0d748c286c9f7
<?php
/**
 * Joomla! Content Management System
 *
 * @copyright  Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
 * @license    GNU General Public License version 2 or later; see LICENSE
 */

namespace Joomla\CMS\Dispatcher;

\defined('_JEXEC') or die;

/**
 * Base class for a Joomla Module Dispatcher
 *
 * Executes the single entry file of a module.
 *
 * @since  4.0.0
 */
class ModuleDispatcher extends AbstractModuleDispatcher
{
	/**
	 * Dispatches the dispatcher.
	 *
	 * @return  void
	 *
	 * @since   4.0.0
	 */
	public function dispatch()
	{
		$path = JPATH_BASE . '/modules/' . $this->module->module . '/' . $this->module->module . '.php';

		if (!file_exists($path))
		{
			return;
		}

		$this->loadLanguage();

		// Execute the layout without the module context
		$loader = static function ($path, array $displayData)
		{
			extract($displayData);
			include $path;
		};

		$loader($path, $this->getLayoutData());
	}
}

No other release has this exact content. See every version of this file.