mirror of
https://github.com/webmasterskaya/joomla-oauth-server.git
synced 2024-11-23 22:34:50 +03:00
_JEXEC & copyright
This commit is contained in:
parent
0cce4012be
commit
9a4ff028f4
@ -1,22 +1,36 @@
|
|||||||
<?php
|
<?php
|
||||||
|
/**
|
||||||
|
* @package Joomla.Administrator
|
||||||
|
* @subpackage com_oauthserver
|
||||||
|
*
|
||||||
|
* @copyright (c) 2024. Webmasterskaya. <https://webmasterskaya.xyz>
|
||||||
|
* @license MIT; see LICENSE.txt
|
||||||
|
**/
|
||||||
|
|
||||||
namespace Webmasterskaya\Component\OauthServer\Administrator\Helper;
|
namespace Webmasterskaya\Component\OauthServer\Administrator\Helper;
|
||||||
|
|
||||||
|
\defined('_JEXEC') or die;
|
||||||
|
|
||||||
abstract class ComponentHelper
|
abstract class ComponentHelper
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* Creates a Composer autoloader, unregisters it, and registers it again at the end of the autoloader stack.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
* @since version
|
||||||
|
*/
|
||||||
public static function registerComponentDependencies(): void
|
public static function registerComponentDependencies(): void
|
||||||
{
|
{
|
||||||
static $registered;
|
static $registered;
|
||||||
|
|
||||||
if (!isset($registered)) {
|
if (!isset($registered))
|
||||||
|
{
|
||||||
/** @var \Composer\Autoload\ClassLoader $loader */
|
/** @var \Composer\Autoload\ClassLoader $loader */
|
||||||
$loader = require JPATH_ADMINISTRATOR . '/components/com_oauthserver/vendor/autoload.php';
|
$loader = require JPATH_ADMINISTRATOR . '/components/com_oauthserver/vendor/autoload.php';
|
||||||
|
|
||||||
$loader->unregister();
|
$loader->unregister();
|
||||||
|
|
||||||
if (spl_autoload_register([new \Joomla\CMS\Autoload\ClassLoader($loader), 'loadClass'])) {
|
$loader->register();
|
||||||
$registered = true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user