-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJoomengine_mcpInstallerScript.php
More file actions
40 lines (37 loc) · 1.25 KB
/
Copy pathJoomengine_mcpInstallerScript.php
File metadata and controls
40 lines (37 loc) · 1.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<?php
/**
* @package JoomEngine.Mcp
* @created 18 September 2026
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @copyright Copyright (C) 2026 Vast Development Method. All rights reserved.
* @license GNU General Public License version 3 or later; see LICENSE
*/
use Joomla\CMS\Factory;
use Joomla\CMS\Installer\InstallerScriptInterface;
use Joomla\Database\DatabaseInterface;
use Joomla\DI\Container;
use Joomla\DI\ServiceProviderInterface;
use VDM\Component\JoomEngineMcp\Administrator\Installer\InstallerScript;
\defined('_JEXEC') or die;
if (!class_exists(InstallerScript::class, false))
{
require_once is_file(__DIR__ . '/admin/src/Installer/InstallerScript.php')
? __DIR__ . '/admin/src/Installer/InstallerScript.php'
: __DIR__ . '/src/Installer/InstallerScript.php';
}
/**
* Native Joomla installer composition root for uploaded and installed contexts.
*
* @since 0.1.0
*/
return new class implements ServiceProviderInterface
{
/** @inheritDoc */
public function register(Container $container): void
{
$container->set(InstallerScriptInterface::class, static function (Container $container): InstallerScriptInterface
{
return new InstallerScript($container->get(DatabaseInterface::class), Factory::getApplication());
});
}
};