update 2024-04-25 16:46:58
This commit is contained in:
parent
0c98ab5bb5
commit
de1a49f601
@ -16,13 +16,10 @@ class Autoloader #Gold {
|
|||||||
# Content $content
|
# Content $content
|
||||||
# string $helper
|
# string $helper
|
||||||
+ __construct(Power $power, Config $config, ...)
|
+ __construct(Power $power, Config $config, ...)
|
||||||
|
+ setFiles() : void
|
||||||
+ set() : void
|
+ set() : void
|
||||||
- loadPluginAutoloader() : bool
|
|
||||||
- loadHelperAutoloader() : bool
|
|
||||||
- loadSiteAutoloader() : bool
|
|
||||||
- getPluginAutoloader() : string
|
|
||||||
- getHelperAutoloader() : string
|
- getHelperAutoloader() : string
|
||||||
- getBLockSiteLoading() : ?string
|
- getAutoloaderFile(int $tabSpace, string $area = 'JPATH_ADMINISTRATOR') : ?string
|
||||||
- getAutoloader(int $tabSpace) : ?string
|
- getAutoloader(int $tabSpace) : ?string
|
||||||
- getComposer(int $tabSpace) : ?string
|
- getComposer(int $tabSpace) : ?string
|
||||||
}
|
}
|
||||||
@ -38,39 +35,18 @@ note right of Autoloader::__construct
|
|||||||
Content $content
|
Content $content
|
||||||
end note
|
end note
|
||||||
|
|
||||||
note left of Autoloader::set
|
note right of Autoloader::setFiles
|
||||||
Set the autoloader into the active content array
|
Set the autoloader into the active content array
|
||||||
|
|
||||||
since: 3.2.0
|
since: 3.2.0
|
||||||
return: void
|
return: void
|
||||||
end note
|
end note
|
||||||
|
|
||||||
note right of Autoloader::loadPluginAutoloader
|
note right of Autoloader::set
|
||||||
Should we load the plugin autoloader
|
Set the autoloader into the active content array
|
||||||
|
|
||||||
since: 3.2.0
|
since: 3.2.0
|
||||||
return: bool
|
return: void
|
||||||
end note
|
|
||||||
|
|
||||||
note left of Autoloader::loadHelperAutoloader
|
|
||||||
Should we load the helper class autoloader
|
|
||||||
|
|
||||||
since: 3.2.0
|
|
||||||
return: bool
|
|
||||||
end note
|
|
||||||
|
|
||||||
note right of Autoloader::loadSiteAutoloader
|
|
||||||
Should we load the autoloader in site area
|
|
||||||
|
|
||||||
since: 3.2.0
|
|
||||||
return: bool
|
|
||||||
end note
|
|
||||||
|
|
||||||
note left of Autoloader::getPluginAutoloader
|
|
||||||
Get helper autoloader code
|
|
||||||
|
|
||||||
since: 3.2.0
|
|
||||||
return: string
|
|
||||||
end note
|
end note
|
||||||
|
|
||||||
note right of Autoloader::getHelperAutoloader
|
note right of Autoloader::getHelperAutoloader
|
||||||
@ -80,11 +56,10 @@ note right of Autoloader::getHelperAutoloader
|
|||||||
return: string
|
return: string
|
||||||
end note
|
end note
|
||||||
|
|
||||||
note left of Autoloader::getBLockSiteLoading
|
note right of Autoloader::getAutoloaderFile
|
||||||
Get code that will block the plugin from loading
|
Get autoloader file
|
||||||
the autoloader in the site area
|
|
||||||
|
|
||||||
since: 3.2.0
|
since: 3.2.1
|
||||||
return: ?string
|
return: ?string
|
||||||
end note
|
end note
|
||||||
|
|
||||||
@ -95,7 +70,7 @@ note right of Autoloader::getAutoloader
|
|||||||
return: ?string
|
return: ?string
|
||||||
end note
|
end note
|
||||||
|
|
||||||
note left of Autoloader::getComposer
|
note right of Autoloader::getComposer
|
||||||
Get the composer autoloader routine
|
Get the composer autoloader routine
|
||||||
|
|
||||||
since: 3.2.0
|
since: 3.2.0
|
||||||
|
@ -77,7 +77,27 @@ class Autoloader
|
|||||||
// reset all autoloaders power placeholders
|
// reset all autoloaders power placeholders
|
||||||
$this->content->set('ADMIN_POWER_HELPER', '');
|
$this->content->set('ADMIN_POWER_HELPER', '');
|
||||||
$this->content->set('SITE_POWER_HELPER', '');
|
$this->content->set('SITE_POWER_HELPER', '');
|
||||||
|
$this->content->set('PLUGIN_POWER_AUTOLOADER', '');
|
||||||
$this->content->set('CUSTOM_POWER_AUTOLOADER', '');
|
$this->content->set('CUSTOM_POWER_AUTOLOADER', '');
|
||||||
|
$this->content->set('SITE_PLUGIN_POWER_AUTOLOADER', '');
|
||||||
|
$this->content->set('SITE_CUSTOM_POWER_AUTOLOADER', '');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the autoloader into the active content array
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
* @since 3.2.0
|
||||||
|
*/
|
||||||
|
public function setFiles()
|
||||||
|
{
|
||||||
|
// check if we are using a plugin
|
||||||
|
$this->content->set('PLUGIN_POWER_AUTOLOADER', PHP_EOL . PHP_EOL . $this->getAutoloaderFile(2));
|
||||||
|
$this->content->set('SITE_PLUGIN_POWER_AUTOLOADER', PHP_EOL . PHP_EOL . $this->getAutoloaderFile(2, 'JPATH_SITE'));
|
||||||
|
|
||||||
|
// to add to custom files
|
||||||
|
$this->content->add('CUSTOM_POWER_AUTOLOADER', $this->getAutoloaderFile(0));
|
||||||
|
$this->content->add('SITE_CUSTOM_POWER_AUTOLOADER', $this->getAutoloaderFile(0, 'JPATH_SITE'));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -89,9 +109,9 @@ class Autoloader
|
|||||||
public function set()
|
public function set()
|
||||||
{
|
{
|
||||||
// make sure we only load this once
|
// make sure we only load this once
|
||||||
if (ArrayHelper::check($this->power->namespace) && !$this->content->isString('CUSTOM_POWER_AUTOLOADER'))
|
if (ArrayHelper::check($this->power->namespace) && !$this->content->isString('ADMIN_POWER_HELPER'))
|
||||||
{
|
{
|
||||||
/************************* IMPORTANT SORT NOTICE ***********************************************
|
/** *********************** IMPORTANT SORT NOTICE ***********************************************
|
||||||
* make sure the name space values are sorted from the longest string to the shortest
|
* make sure the name space values are sorted from the longest string to the shortest
|
||||||
* so that the search do not mistakenly match a shorter namespace before a longer one
|
* so that the search do not mistakenly match a shorter namespace before a longer one
|
||||||
* that has the same short namespace for example:
|
* that has the same short namespace for example:
|
||||||
@ -102,110 +122,18 @@ class Autoloader
|
|||||||
* ^^^^^^^^^^^^^^^^^^^^^^
|
* ^^^^^^^^^^^^^^^^^^^^^^
|
||||||
* NameSpace\SubName\SubSubName\ClassName
|
* NameSpace\SubName\SubSubName\ClassName
|
||||||
* ^^^^^^^^^^^^^^^^^^^^^^
|
* ^^^^^^^^^^^^^^^^^^^^^^
|
||||||
***********************************************************************************************/
|
** *********************************************************************************************/
|
||||||
|
|
||||||
uksort($this->power->namespace, fn($a, $b) => strlen((string) $b) - strlen((string) $a));
|
uksort($this->power->namespace, fn($a, $b) => strlen((string) $b) - strlen((string) $a));
|
||||||
|
|
||||||
// check if we are using a plugin
|
// load to admin helper class
|
||||||
if ($this->loadPluginAutoloader())
|
$this->content->add('ADMIN_POWER_HELPER', $this->getHelperAutoloader());
|
||||||
{
|
|
||||||
$this->content->set('PLUGIN_POWER_AUTOLOADER', $this->getPluginAutoloader());
|
|
||||||
}
|
|
||||||
|
|
||||||
// load to the helper class
|
// load to site helper class if needed
|
||||||
if ($this->loadHelperAutoloader())
|
$this->content->add('SITE_POWER_HELPER', $this->getHelperAutoloader());
|
||||||
{
|
|
||||||
// load to admin helper class
|
|
||||||
$this->content->add('ADMIN_POWER_HELPER', $this->getHelperAutoloader());
|
|
||||||
|
|
||||||
// load to site helper class if needed
|
|
||||||
if ($this->loadSiteAutoloader())
|
|
||||||
{
|
|
||||||
$this->content->add('SITE_POWER_HELPER', $this->getHelperAutoloader());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// to add to custom files
|
|
||||||
$this->content->add('CUSTOM_POWER_AUTOLOADER', $this->getHelperAutoloader());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Should we load the plugin autoloader
|
|
||||||
*
|
|
||||||
* @return bool
|
|
||||||
* @since 3.2.0
|
|
||||||
*/
|
|
||||||
private function loadPluginAutoloader(): bool
|
|
||||||
{
|
|
||||||
return $this->content->exists('PLUGIN_POWER_AUTOLOADER');
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Should we load the helper class autoloader
|
|
||||||
*
|
|
||||||
* @return bool
|
|
||||||
* @since 3.2.0
|
|
||||||
*/
|
|
||||||
private function loadHelperAutoloader(): bool
|
|
||||||
{
|
|
||||||
// for now we load it if the plugin is not loaded
|
|
||||||
// but we may want to add a switch that
|
|
||||||
// controls this behaviour.
|
|
||||||
// return !$this->loadPluginAutoloader();
|
|
||||||
// lets load it anyway (can't break anything)
|
|
||||||
// but we will still like a switch for this
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Should we load the autoloader in site area
|
|
||||||
*
|
|
||||||
* @return bool
|
|
||||||
* @since 3.2.0
|
|
||||||
*/
|
|
||||||
private function loadSiteAutoloader(): bool
|
|
||||||
{
|
|
||||||
return (!$this->config->remove_site_folder || !$this->config->remove_site_edit_folder);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get helper autoloader code
|
|
||||||
*
|
|
||||||
* @return string
|
|
||||||
* @since 3.2.0
|
|
||||||
*/
|
|
||||||
private function getPluginAutoloader(): string
|
|
||||||
{
|
|
||||||
// load the code
|
|
||||||
$code = [];
|
|
||||||
|
|
||||||
// if we should not load in the site are
|
|
||||||
if (($script = $this->getBLockSiteLoading()) !== null)
|
|
||||||
{
|
|
||||||
$code[] = $script;
|
|
||||||
}
|
|
||||||
|
|
||||||
// add the composer stuff here
|
|
||||||
if (($script = $this->getComposer(2)) !== null)
|
|
||||||
{
|
|
||||||
$code[] = $script;
|
|
||||||
}
|
|
||||||
|
|
||||||
// get the helper autoloader
|
|
||||||
if (($script = $this->getAutoloader(2)) !== null)
|
|
||||||
{
|
|
||||||
$code[] = $script;
|
|
||||||
}
|
|
||||||
|
|
||||||
// if we have any
|
|
||||||
if (!empty($code))
|
|
||||||
{
|
|
||||||
return PHP_EOL . PHP_EOL . implode(PHP_EOL . PHP_EOL, $code);
|
|
||||||
}
|
|
||||||
|
|
||||||
return '';
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get helper autoloader code
|
* Get helper autoloader code
|
||||||
*
|
*
|
||||||
@ -245,30 +173,29 @@ class Autoloader
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get code that will block the plugin from loading
|
* Get autoloader file
|
||||||
* the autoloader in the site area
|
*
|
||||||
|
* @param int $tabSpace The dynamic tab spacer
|
||||||
|
* @param string $area The target area
|
||||||
*
|
*
|
||||||
* @return string|null
|
* @return string|null
|
||||||
* @since 3.2.0
|
* @since 3.2.1
|
||||||
*/
|
*/
|
||||||
private function getBLockSiteLoading(): ?string
|
private function getAutoloaderFile(int $tabSpace, string $area = 'JPATH_ADMINISTRATOR'): ?string
|
||||||
{
|
{
|
||||||
// if we should not load in the site are
|
// we start building the autoloaded file loader
|
||||||
if (!$this->loadSiteAutoloader())
|
$autoload_file = [];
|
||||||
{
|
$autoload_file[] = Indent::_($tabSpace) . '//'
|
||||||
// we add code to prevent this plugin from triggering on the site area
|
. Line::_(__Line__, __Class__) . ' The power autoloader for this project admin area.';
|
||||||
$not_site = [];
|
$autoload_file[] = Indent::_($tabSpace) . "\$power_autoloader = $area . '/componenents/com_"
|
||||||
$not_site[] = Indent::_(2) . '//'
|
. $this->config->get('component_code_name', 'ERROR') . '/'
|
||||||
. Line::_(__Line__, __Class__) . ' do not run the autoloader in the site area';
|
. $this->config->get('component_autoloader_path', 'ERROR') . "';";
|
||||||
$not_site[] = Indent::_(2) . 'if ($this->app->isClient(\'site\'))';
|
$autoload_file[] = Indent::_($tabSpace) . 'if (file_exists($power_autoloader))';
|
||||||
$not_site[] = Indent::_(2) . '{';
|
$autoload_file[] = Indent::_($tabSpace) . '{';
|
||||||
$not_site[] = Indent::_(3) . 'return;';
|
$autoload_file[] = Indent::_($tabSpace) . Indent::_(1) . 'require_once $power_autoloader;';
|
||||||
$not_site[] = Indent::_(2) . '}';
|
$autoload_file[] = Indent::_($tabSpace) . '}';
|
||||||
|
|
||||||
return implode(PHP_EOL, $not_site);
|
return implode(PHP_EOL, $autoload_file);
|
||||||
}
|
|
||||||
|
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -287,7 +214,7 @@ class Autoloader
|
|||||||
$autoload_method = [];
|
$autoload_method = [];
|
||||||
$autoload_method[] = Indent::_($tabSpace) . '//'
|
$autoload_method[] = Indent::_($tabSpace) . '//'
|
||||||
. Line::_(__Line__, __Class__) . ' register additional namespace';
|
. Line::_(__Line__, __Class__) . ' register additional namespace';
|
||||||
$autoload_method[] = Indent::_($tabSpace) . '\spl_autoload_register(function ($class) {';
|
$autoload_method[] = Indent::_($tabSpace) . 'spl_autoload_register(function ($class) {';
|
||||||
$autoload_method[] = Indent::_($tabSpace) . Indent::_(1) . '//'
|
$autoload_method[] = Indent::_($tabSpace) . Indent::_(1) . '//'
|
||||||
. Line::_(__Line__, __Class__) . ' project-specific base directories and namespace prefix';
|
. Line::_(__Line__, __Class__) . ' project-specific base directories and namespace prefix';
|
||||||
$autoload_method[] = Indent::_($tabSpace) . Indent::_(1) . '$search = [';
|
$autoload_method[] = Indent::_($tabSpace) . Indent::_(1) . '$search = [';
|
||||||
|
@ -48,7 +48,27 @@
|
|||||||
// reset all autoloaders power placeholders
|
// reset all autoloaders power placeholders
|
||||||
$this->content->set('ADMIN_POWER_HELPER', '');
|
$this->content->set('ADMIN_POWER_HELPER', '');
|
||||||
$this->content->set('SITE_POWER_HELPER', '');
|
$this->content->set('SITE_POWER_HELPER', '');
|
||||||
|
$this->content->set('PLUGIN_POWER_AUTOLOADER', '');
|
||||||
$this->content->set('CUSTOM_POWER_AUTOLOADER', '');
|
$this->content->set('CUSTOM_POWER_AUTOLOADER', '');
|
||||||
|
$this->content->set('SITE_PLUGIN_POWER_AUTOLOADER', '');
|
||||||
|
$this->content->set('SITE_CUSTOM_POWER_AUTOLOADER', '');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the autoloader into the active content array
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
* @since 3.2.0
|
||||||
|
*/
|
||||||
|
public function setFiles()
|
||||||
|
{
|
||||||
|
// check if we are using a plugin
|
||||||
|
$this->content->set('PLUGIN_POWER_AUTOLOADER', PHP_EOL . PHP_EOL . $this->getAutoloaderFile(2));
|
||||||
|
$this->content->set('SITE_PLUGIN_POWER_AUTOLOADER', PHP_EOL . PHP_EOL . $this->getAutoloaderFile(2, 'JPATH_SITE'));
|
||||||
|
|
||||||
|
// to add to custom files
|
||||||
|
$this->content->add('CUSTOM_POWER_AUTOLOADER', $this->getAutoloaderFile(0));
|
||||||
|
$this->content->add('SITE_CUSTOM_POWER_AUTOLOADER', $this->getAutoloaderFile(0, 'JPATH_SITE'));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -60,9 +80,9 @@
|
|||||||
public function set()
|
public function set()
|
||||||
{
|
{
|
||||||
// make sure we only load this once
|
// make sure we only load this once
|
||||||
if (ArrayHelper::check($this->power->namespace) && !$this->content->isString('CUSTOM_POWER_AUTOLOADER'))
|
if (ArrayHelper::check($this->power->namespace) && !$this->content->isString('ADMIN_POWER_HELPER'))
|
||||||
{
|
{
|
||||||
/************************* IMPORTANT SORT NOTICE ***********************************************
|
/** *********************** IMPORTANT SORT NOTICE ***********************************************
|
||||||
* make sure the name space values are sorted from the longest string to the shortest
|
* make sure the name space values are sorted from the longest string to the shortest
|
||||||
* so that the search do not mistakenly match a shorter namespace before a longer one
|
* so that the search do not mistakenly match a shorter namespace before a longer one
|
||||||
* that has the same short namespace for example:
|
* that has the same short namespace for example:
|
||||||
@ -73,110 +93,18 @@
|
|||||||
* ^^^^^^^^^^^^^^^^^^^^^^
|
* ^^^^^^^^^^^^^^^^^^^^^^
|
||||||
* NameSpace\SubName\SubSubName\ClassName
|
* NameSpace\SubName\SubSubName\ClassName
|
||||||
* ^^^^^^^^^^^^^^^^^^^^^^
|
* ^^^^^^^^^^^^^^^^^^^^^^
|
||||||
***********************************************************************************************/
|
** *********************************************************************************************/
|
||||||
|
|
||||||
uksort($this->power->namespace, fn($a, $b) => strlen((string) $b) - strlen((string) $a));
|
uksort($this->power->namespace, fn($a, $b) => strlen((string) $b) - strlen((string) $a));
|
||||||
|
|
||||||
// check if we are using a plugin
|
// load to admin helper class
|
||||||
if ($this->loadPluginAutoloader())
|
$this->content->add('ADMIN_POWER_HELPER', $this->getHelperAutoloader());
|
||||||
{
|
|
||||||
$this->content->set('PLUGIN_POWER_AUTOLOADER', $this->getPluginAutoloader());
|
|
||||||
}
|
|
||||||
|
|
||||||
// load to the helper class
|
// load to site helper class if needed
|
||||||
if ($this->loadHelperAutoloader())
|
$this->content->add('SITE_POWER_HELPER', $this->getHelperAutoloader());
|
||||||
{
|
|
||||||
// load to admin helper class
|
|
||||||
$this->content->add('ADMIN_POWER_HELPER', $this->getHelperAutoloader());
|
|
||||||
|
|
||||||
// load to site helper class if needed
|
|
||||||
if ($this->loadSiteAutoloader())
|
|
||||||
{
|
|
||||||
$this->content->add('SITE_POWER_HELPER', $this->getHelperAutoloader());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// to add to custom files
|
|
||||||
$this->content->add('CUSTOM_POWER_AUTOLOADER', $this->getHelperAutoloader());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Should we load the plugin autoloader
|
|
||||||
*
|
|
||||||
* @return bool
|
|
||||||
* @since 3.2.0
|
|
||||||
*/
|
|
||||||
private function loadPluginAutoloader(): bool
|
|
||||||
{
|
|
||||||
return $this->content->exists('PLUGIN_POWER_AUTOLOADER');
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Should we load the helper class autoloader
|
|
||||||
*
|
|
||||||
* @return bool
|
|
||||||
* @since 3.2.0
|
|
||||||
*/
|
|
||||||
private function loadHelperAutoloader(): bool
|
|
||||||
{
|
|
||||||
// for now we load it if the plugin is not loaded
|
|
||||||
// but we may want to add a switch that
|
|
||||||
// controls this behaviour.
|
|
||||||
// return !$this->loadPluginAutoloader();
|
|
||||||
// lets load it anyway (can't break anything)
|
|
||||||
// but we will still like a switch for this
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Should we load the autoloader in site area
|
|
||||||
*
|
|
||||||
* @return bool
|
|
||||||
* @since 3.2.0
|
|
||||||
*/
|
|
||||||
private function loadSiteAutoloader(): bool
|
|
||||||
{
|
|
||||||
return (!$this->config->remove_site_folder || !$this->config->remove_site_edit_folder);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get helper autoloader code
|
|
||||||
*
|
|
||||||
* @return string
|
|
||||||
* @since 3.2.0
|
|
||||||
*/
|
|
||||||
private function getPluginAutoloader(): string
|
|
||||||
{
|
|
||||||
// load the code
|
|
||||||
$code = [];
|
|
||||||
|
|
||||||
// if we should not load in the site are
|
|
||||||
if (($script = $this->getBLockSiteLoading()) !== null)
|
|
||||||
{
|
|
||||||
$code[] = $script;
|
|
||||||
}
|
|
||||||
|
|
||||||
// add the composer stuff here
|
|
||||||
if (($script = $this->getComposer(2)) !== null)
|
|
||||||
{
|
|
||||||
$code[] = $script;
|
|
||||||
}
|
|
||||||
|
|
||||||
// get the helper autoloader
|
|
||||||
if (($script = $this->getAutoloader(2)) !== null)
|
|
||||||
{
|
|
||||||
$code[] = $script;
|
|
||||||
}
|
|
||||||
|
|
||||||
// if we have any
|
|
||||||
if (!empty($code))
|
|
||||||
{
|
|
||||||
return PHP_EOL . PHP_EOL . implode(PHP_EOL . PHP_EOL, $code);
|
|
||||||
}
|
|
||||||
|
|
||||||
return '';
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get helper autoloader code
|
* Get helper autoloader code
|
||||||
*
|
*
|
||||||
@ -216,30 +144,29 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get code that will block the plugin from loading
|
* Get autoloader file
|
||||||
* the autoloader in the site area
|
*
|
||||||
|
* @param int $tabSpace The dynamic tab spacer
|
||||||
|
* @param string $area The target area
|
||||||
*
|
*
|
||||||
* @return string|null
|
* @return string|null
|
||||||
* @since 3.2.0
|
* @since 3.2.1
|
||||||
*/
|
*/
|
||||||
private function getBLockSiteLoading(): ?string
|
private function getAutoloaderFile(int $tabSpace, string $area = 'JPATH_ADMINISTRATOR'): ?string
|
||||||
{
|
{
|
||||||
// if we should not load in the site are
|
// we start building the autoloaded file loader
|
||||||
if (!$this->loadSiteAutoloader())
|
$autoload_file = [];
|
||||||
{
|
$autoload_file[] = Indent::_($tabSpace) . '//'
|
||||||
// we add code to prevent this plugin from triggering on the site area
|
. Line::_(__Line__, __Class__) . ' The power autoloader for this project admin area.';
|
||||||
$not_site = [];
|
$autoload_file[] = Indent::_($tabSpace) . "\$power_autoloader = $area . '/componenents/com_"
|
||||||
$not_site[] = Indent::_(2) . '//'
|
. $this->config->get('component_code_name', 'ERROR') . '/'
|
||||||
. Line::_(__Line__, __Class__) . ' do not run the autoloader in the site area';
|
. $this->config->get('component_autoloader_path', 'ERROR') . "';";
|
||||||
$not_site[] = Indent::_(2) . 'if ($this->app->isClient(\'site\'))';
|
$autoload_file[] = Indent::_($tabSpace) . 'if (file_exists($power_autoloader))';
|
||||||
$not_site[] = Indent::_(2) . '{';
|
$autoload_file[] = Indent::_($tabSpace) . '{';
|
||||||
$not_site[] = Indent::_(3) . 'return;';
|
$autoload_file[] = Indent::_($tabSpace) . Indent::_(1) . 'require_once $power_autoloader;';
|
||||||
$not_site[] = Indent::_(2) . '}';
|
$autoload_file[] = Indent::_($tabSpace) . '}';
|
||||||
|
|
||||||
return implode(PHP_EOL, $not_site);
|
return implode(PHP_EOL, $autoload_file);
|
||||||
}
|
|
||||||
|
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -258,7 +185,7 @@
|
|||||||
$autoload_method = [];
|
$autoload_method = [];
|
||||||
$autoload_method[] = Indent::_($tabSpace) . '//'
|
$autoload_method[] = Indent::_($tabSpace) . '//'
|
||||||
. Line::_(__Line__, __Class__) . ' register additional namespace';
|
. Line::_(__Line__, __Class__) . ' register additional namespace';
|
||||||
$autoload_method[] = Indent::_($tabSpace) . '\spl_autoload_register(function ($class) {';
|
$autoload_method[] = Indent::_($tabSpace) . 'spl_autoload_register(function ($class) {';
|
||||||
$autoload_method[] = Indent::_($tabSpace) . Indent::_(1) . '//'
|
$autoload_method[] = Indent::_($tabSpace) . Indent::_(1) . '//'
|
||||||
. Line::_(__Line__, __Class__) . ' project-specific base directories and namespace prefix';
|
. Line::_(__Line__, __Class__) . ' project-specific base directories and namespace prefix';
|
||||||
$autoload_method[] = Indent::_($tabSpace) . Indent::_(1) . '$search = [';
|
$autoload_method[] = Indent::_($tabSpace) . Indent::_(1) . '$search = [';
|
||||||
|
@ -30,6 +30,7 @@ class Config #Gold {
|
|||||||
# getComponentcodename() : string
|
# getComponentcodename() : string
|
||||||
# getComponentcontext() : string
|
# getComponentcontext() : string
|
||||||
# getComponentcodenamelength() : int
|
# getComponentcodenamelength() : int
|
||||||
|
# getComponentautoloaderpath() : string
|
||||||
# getAddnamespaceprefix() : bool
|
# getAddnamespaceprefix() : bool
|
||||||
# getNamespaceprefix() : string
|
# getNamespaceprefix() : string
|
||||||
# getJoomlaversion() : int
|
# getJoomlaversion() : int
|
||||||
@ -214,413 +215,420 @@ note right of Config::getComponentcodenamelength
|
|||||||
return: int
|
return: int
|
||||||
end note
|
end note
|
||||||
|
|
||||||
note left of Config::getAddnamespaceprefix
|
note left of Config::getComponentautoloaderpath
|
||||||
|
get component autoloader path
|
||||||
|
|
||||||
|
since: 3.2.0
|
||||||
|
return: string
|
||||||
|
end note
|
||||||
|
|
||||||
|
note right of Config::getAddnamespaceprefix
|
||||||
get add namespace prefix
|
get add namespace prefix
|
||||||
|
|
||||||
since: 3.2.0
|
since: 3.2.0
|
||||||
return: bool
|
return: bool
|
||||||
end note
|
end note
|
||||||
|
|
||||||
note right of Config::getNamespaceprefix
|
note left of Config::getNamespaceprefix
|
||||||
get namespace prefix
|
get namespace prefix
|
||||||
|
|
||||||
since: 3.2.0
|
since: 3.2.0
|
||||||
return: string
|
return: string
|
||||||
end note
|
end note
|
||||||
|
|
||||||
note left of Config::getJoomlaversion
|
note right of Config::getJoomlaversion
|
||||||
get posted Joomla version
|
get posted Joomla version
|
||||||
|
|
||||||
since: 3.2.0
|
since: 3.2.0
|
||||||
return: int
|
return: int
|
||||||
end note
|
end note
|
||||||
|
|
||||||
note right of Config::getJoomlaversions
|
note left of Config::getJoomlaversions
|
||||||
get Joomla versions
|
get Joomla versions
|
||||||
|
|
||||||
since: 3.2.0
|
since: 3.2.0
|
||||||
return: array
|
return: array
|
||||||
end note
|
end note
|
||||||
|
|
||||||
note left of Config::getJoomlaversionname
|
note right of Config::getJoomlaversionname
|
||||||
get posted Joomla version name
|
get posted Joomla version name
|
||||||
|
|
||||||
since: 3.2.0
|
since: 3.2.0
|
||||||
return: string
|
return: string
|
||||||
end note
|
end note
|
||||||
|
|
||||||
note right of Config::getSetjoomlafields
|
note left of Config::getSetjoomlafields
|
||||||
set joomla fields
|
set joomla fields
|
||||||
|
|
||||||
since: 3.2.0
|
since: 3.2.0
|
||||||
return: bool
|
return: bool
|
||||||
end note
|
end note
|
||||||
|
|
||||||
note left of Config::getShowadvancedoptions
|
note right of Config::getShowadvancedoptions
|
||||||
get show advanced options switch
|
get show advanced options switch
|
||||||
|
|
||||||
since: 3.2.0
|
since: 3.2.0
|
||||||
return: bool
|
return: bool
|
||||||
end note
|
end note
|
||||||
|
|
||||||
note right of Config::getIndentationvalue
|
note left of Config::getIndentationvalue
|
||||||
get indentation value
|
get indentation value
|
||||||
|
|
||||||
since: 3.2.0
|
since: 3.2.0
|
||||||
return: string
|
return: string
|
||||||
end note
|
end note
|
||||||
|
|
||||||
note left of Config::getAddbuilddate
|
note right of Config::getAddbuilddate
|
||||||
get add build date switch
|
get add build date switch
|
||||||
|
|
||||||
since: 3.2.0
|
since: 3.2.0
|
||||||
return: int
|
return: int
|
||||||
end note
|
end note
|
||||||
|
|
||||||
note right of Config::getBuilddate
|
note left of Config::getBuilddate
|
||||||
get build date
|
get build date
|
||||||
|
|
||||||
since: 3.2.0
|
since: 3.2.0
|
||||||
return: string
|
return: string
|
||||||
end note
|
end note
|
||||||
|
|
||||||
note left of Config::getBackup
|
note right of Config::getBackup
|
||||||
get posted backup switch
|
get posted backup switch
|
||||||
|
|
||||||
since: 3.2.0
|
since: 3.2.0
|
||||||
return: int
|
return: int
|
||||||
end note
|
end note
|
||||||
|
|
||||||
note right of Config::getRepository
|
note left of Config::getRepository
|
||||||
get posted repository switch
|
get posted repository switch
|
||||||
|
|
||||||
since: 3.2.0
|
since: 3.2.0
|
||||||
return: int
|
return: int
|
||||||
end note
|
end note
|
||||||
|
|
||||||
note left of Config::getDebuglinenr
|
note right of Config::getDebuglinenr
|
||||||
get posted debuglinenr switch
|
get posted debuglinenr switch
|
||||||
|
|
||||||
since: 3.2.0
|
since: 3.2.0
|
||||||
return: int
|
return: int
|
||||||
end note
|
end note
|
||||||
|
|
||||||
note right of Config::getMinify
|
note left of Config::getMinify
|
||||||
get posted minify switch
|
get posted minify switch
|
||||||
|
|
||||||
since: 3.2.0
|
since: 3.2.0
|
||||||
return: int
|
return: int
|
||||||
end note
|
end note
|
||||||
|
|
||||||
note left of Config::getRemovelinebreaks
|
note right of Config::getRemovelinebreaks
|
||||||
get posted remove line breaks switch
|
get posted remove line breaks switch
|
||||||
|
|
||||||
since: 3.2.0
|
since: 3.2.0
|
||||||
return: bool
|
return: bool
|
||||||
end note
|
end note
|
||||||
|
|
||||||
note right of Config::getTidy
|
note left of Config::getTidy
|
||||||
get system tidy state
|
get system tidy state
|
||||||
|
|
||||||
since: 3.2.0
|
since: 3.2.0
|
||||||
return: bool
|
return: bool
|
||||||
end note
|
end note
|
||||||
|
|
||||||
note left of Config::getSettidywarning
|
note right of Config::getSettidywarning
|
||||||
add tidy warning
|
add tidy warning
|
||||||
|
|
||||||
since: 3.2.0
|
since: 3.2.0
|
||||||
return: bool
|
return: bool
|
||||||
end note
|
end note
|
||||||
|
|
||||||
note right of Config::getSettaghistory
|
note left of Config::getSettaghistory
|
||||||
get history tag switch
|
get history tag switch
|
||||||
|
|
||||||
since: 3.2.0
|
since: 3.2.0
|
||||||
return: bool
|
return: bool
|
||||||
end note
|
end note
|
||||||
|
|
||||||
note left of Config::getPercentagelanguageadd
|
note right of Config::getPercentagelanguageadd
|
||||||
get percentage when a language should be added
|
get percentage when a language should be added
|
||||||
|
|
||||||
since: 3.2.0
|
since: 3.2.0
|
||||||
return: int
|
return: int
|
||||||
end note
|
end note
|
||||||
|
|
||||||
note right of Config::getLangtag
|
note left of Config::getLangtag
|
||||||
get language tag
|
get language tag
|
||||||
|
|
||||||
since: 3.2.0
|
since: 3.2.0
|
||||||
return: string
|
return: string
|
||||||
end note
|
end note
|
||||||
|
|
||||||
note left of Config::getLangprefix
|
note right of Config::getLangprefix
|
||||||
get language prefix
|
get language prefix
|
||||||
|
|
||||||
since: 3.2.0
|
since: 3.2.0
|
||||||
return: string
|
return: string
|
||||||
end note
|
end note
|
||||||
|
|
||||||
note right of Config::getLangtarget
|
note left of Config::getLangtarget
|
||||||
get language target
|
get language target
|
||||||
|
|
||||||
since: 3.2.0
|
since: 3.2.0
|
||||||
return: string
|
return: string
|
||||||
end note
|
end note
|
||||||
|
|
||||||
note left of Config::getLangstringtargets
|
note right of Config::getLangstringtargets
|
||||||
get language string targets
|
get language string targets
|
||||||
|
|
||||||
since: 3.2.0
|
since: 3.2.0
|
||||||
return: array
|
return: array
|
||||||
end note
|
end note
|
||||||
|
|
||||||
note right of Config::getLangstringkeytargets
|
note left of Config::getLangstringkeytargets
|
||||||
get language string targets (by key name)
|
get language string targets (by key name)
|
||||||
|
|
||||||
since: 3.2.0
|
since: 3.2.0
|
||||||
return: array
|
return: array
|
||||||
end note
|
end note
|
||||||
|
|
||||||
note left of Config::getFieldbuildertype
|
note right of Config::getFieldbuildertype
|
||||||
get field builder type
|
get field builder type
|
||||||
|
|
||||||
since: 3.2.0
|
since: 3.2.0
|
||||||
return: int
|
return: int
|
||||||
end note
|
end note
|
||||||
|
|
||||||
note right of Config::getDefaultfields
|
note left of Config::getDefaultfields
|
||||||
get default fields
|
get default fields
|
||||||
|
|
||||||
since: 3.2.0
|
since: 3.2.0
|
||||||
return: array
|
return: array
|
||||||
end note
|
end note
|
||||||
|
|
||||||
note left of Config::getTmppath
|
note right of Config::getTmppath
|
||||||
get temporary path
|
get temporary path
|
||||||
|
|
||||||
since: 3.2.0
|
since: 3.2.0
|
||||||
return: string
|
return: string
|
||||||
end note
|
end note
|
||||||
|
|
||||||
note right of Config::getCompilerpath
|
note left of Config::getCompilerpath
|
||||||
get compiler path
|
get compiler path
|
||||||
|
|
||||||
since: 3.2.0
|
since: 3.2.0
|
||||||
return: string
|
return: string
|
||||||
end note
|
end note
|
||||||
|
|
||||||
note left of Config::getJcbpowerspath
|
note right of Config::getJcbpowerspath
|
||||||
get jcb powers path
|
get jcb powers path
|
||||||
|
|
||||||
since: 3.2.0
|
since: 3.2.0
|
||||||
return: string
|
return: string
|
||||||
end note
|
end note
|
||||||
|
|
||||||
note right of Config::getPowerlibraryfolder
|
note left of Config::getPowerlibraryfolder
|
||||||
get jcb powers path
|
get jcb powers path
|
||||||
|
|
||||||
since: 3.2.0
|
since: 3.2.0
|
||||||
return: string
|
return: string
|
||||||
end note
|
end note
|
||||||
|
|
||||||
note left of Config::getLocalpowersrepositorypath
|
note right of Config::getLocalpowersrepositorypath
|
||||||
Get local super powers repository path
|
Get local super powers repository path
|
||||||
|
|
||||||
since: 3.2.0
|
since: 3.2.0
|
||||||
return: string
|
return: string
|
||||||
end note
|
end note
|
||||||
|
|
||||||
note right of Config::getApprovedpaths
|
note left of Config::getApprovedpaths
|
||||||
Get super power approved paths
|
Get super power approved paths
|
||||||
|
|
||||||
since: 3.2.0
|
since: 3.2.0
|
||||||
return: array
|
return: array
|
||||||
end note
|
end note
|
||||||
|
|
||||||
note left of Config::getJoomlapowerscoreorganisation
|
note right of Config::getJoomlapowerscoreorganisation
|
||||||
Get super power core organisation
|
Get super power core organisation
|
||||||
|
|
||||||
since: 3.2.0
|
since: 3.2.0
|
||||||
return: string
|
return: string
|
||||||
end note
|
end note
|
||||||
|
|
||||||
note right of Config::getJoomlapowersinitrepos
|
note left of Config::getJoomlapowersinitrepos
|
||||||
Get Joomla power init repos
|
Get Joomla power init repos
|
||||||
|
|
||||||
since: 3.2.0
|
since: 3.2.0
|
||||||
return: array
|
return: array
|
||||||
end note
|
end note
|
||||||
|
|
||||||
note left of Config::getLocaljoomlapowersrepositorypath
|
note right of Config::getLocaljoomlapowersrepositorypath
|
||||||
Get local joomla super powers repository path
|
Get local joomla super powers repository path
|
||||||
|
|
||||||
since: 3.2.0
|
since: 3.2.0
|
||||||
return: string
|
return: string
|
||||||
end note
|
end note
|
||||||
|
|
||||||
note right of Config::getApprovedjoomlapaths
|
note left of Config::getApprovedjoomlapaths
|
||||||
Get joomla power approved paths
|
Get joomla power approved paths
|
||||||
|
|
||||||
since: 3.2.0
|
since: 3.2.0
|
||||||
return: array
|
return: array
|
||||||
end note
|
end note
|
||||||
|
|
||||||
note left of Config::getBompath
|
note right of Config::getBompath
|
||||||
get bom path
|
get bom path
|
||||||
|
|
||||||
since: 3.2.0
|
since: 3.2.0
|
||||||
return: string
|
return: string
|
||||||
end note
|
end note
|
||||||
|
|
||||||
note right of Config::getCustomfolderpath
|
note left of Config::getCustomfolderpath
|
||||||
get custom folder path
|
get custom folder path
|
||||||
|
|
||||||
since: 3.2.0
|
since: 3.2.0
|
||||||
return: string
|
return: string
|
||||||
end note
|
end note
|
||||||
|
|
||||||
note left of Config::getAddassetstablefix
|
note right of Config::getAddassetstablefix
|
||||||
get switch to add assets table fix
|
get switch to add assets table fix
|
||||||
|
|
||||||
since: 3.2.0
|
since: 3.2.0
|
||||||
return: int
|
return: int
|
||||||
end note
|
end note
|
||||||
|
|
||||||
note right of Config::getAddassetstablenamefix
|
note left of Config::getAddassetstablenamefix
|
||||||
get switch to add assets table name fix
|
get switch to add assets table name fix
|
||||||
|
|
||||||
since: 3.2.0
|
since: 3.2.0
|
||||||
return: bool
|
return: bool
|
||||||
end note
|
end note
|
||||||
|
|
||||||
note left of Config::getAccessworsecase
|
note right of Config::getAccessworsecase
|
||||||
get access worse case size
|
get access worse case size
|
||||||
|
|
||||||
since: 3.2.0
|
since: 3.2.0
|
||||||
return: int
|
return: int
|
||||||
end note
|
end note
|
||||||
|
|
||||||
note right of Config::getMysqltablekeys
|
note left of Config::getMysqltablekeys
|
||||||
get mysql table keys
|
get mysql table keys
|
||||||
|
|
||||||
since: 3.2.0
|
since: 3.2.0
|
||||||
return: array
|
return: array
|
||||||
end note
|
end note
|
||||||
|
|
||||||
note left of Config::getAddplaceholders
|
note right of Config::getAddplaceholders
|
||||||
get switch add placeholders
|
get switch add placeholders
|
||||||
|
|
||||||
since: 3.2.0
|
since: 3.2.0
|
||||||
return: bool
|
return: bool
|
||||||
end note
|
end note
|
||||||
|
|
||||||
note right of Config::getAddpower
|
note left of Config::getAddpower
|
||||||
get switch add power
|
get switch add power
|
||||||
|
|
||||||
since: 3.2.0
|
since: 3.2.0
|
||||||
return: bool
|
return: bool
|
||||||
end note
|
end note
|
||||||
|
|
||||||
note left of Config::getAddsuperpowers
|
note right of Config::getAddsuperpowers
|
||||||
Get switch to add super powers
|
Get switch to add super powers
|
||||||
|
|
||||||
since: 3.2.0
|
since: 3.2.0
|
||||||
return: bool
|
return: bool
|
||||||
end note
|
end note
|
||||||
|
|
||||||
note right of Config::getAddownpowers
|
note left of Config::getAddownpowers
|
||||||
Get switch to add own super powers
|
Get switch to add own super powers
|
||||||
|
|
||||||
since: 3.2.0
|
since: 3.2.0
|
||||||
return: bool
|
return: bool
|
||||||
end note
|
end note
|
||||||
|
|
||||||
note left of Config::getBuildtarget
|
note right of Config::getBuildtarget
|
||||||
get switch build target switch
|
get switch build target switch
|
||||||
|
|
||||||
since: 3.2.0
|
since: 3.2.0
|
||||||
return: string
|
return: string
|
||||||
end note
|
end note
|
||||||
|
|
||||||
note right of Config::getCryptiontypes
|
note left of Config::getCryptiontypes
|
||||||
get encryption types
|
get encryption types
|
||||||
|
|
||||||
since: 3.2.0
|
since: 3.2.0
|
||||||
return: array
|
return: array
|
||||||
end note
|
end note
|
||||||
|
|
||||||
note left of Config::getBasicencryption
|
note right of Config::getBasicencryption
|
||||||
get basic encryption switch
|
get basic encryption switch
|
||||||
|
|
||||||
since: 3.2.0
|
since: 3.2.0
|
||||||
return: bool
|
return: bool
|
||||||
end note
|
end note
|
||||||
|
|
||||||
note right of Config::getMediumencryption
|
note left of Config::getMediumencryption
|
||||||
get medium encryption switch
|
get medium encryption switch
|
||||||
|
|
||||||
since: 3.2.0
|
since: 3.2.0
|
||||||
return: bool
|
return: bool
|
||||||
end note
|
end note
|
||||||
|
|
||||||
note left of Config::getWhmcsencryption
|
note right of Config::getWhmcsencryption
|
||||||
get whmcs encryption switch
|
get whmcs encryption switch
|
||||||
|
|
||||||
since: 3.2.0
|
since: 3.2.0
|
||||||
return: bool
|
return: bool
|
||||||
end note
|
end note
|
||||||
|
|
||||||
note right of Config::getRemovesitefolder
|
note left of Config::getRemovesitefolder
|
||||||
Should we remove the site folder
|
Should we remove the site folder
|
||||||
|
|
||||||
since: 3.2.0
|
since: 3.2.0
|
||||||
return: bool
|
return: bool
|
||||||
end note
|
end note
|
||||||
|
|
||||||
note left of Config::getRemovesiteeditfolder
|
note right of Config::getRemovesiteeditfolder
|
||||||
Should we remove the site edit folder
|
Should we remove the site edit folder
|
||||||
|
|
||||||
since: 3.2.0
|
since: 3.2.0
|
||||||
return: bool
|
return: bool
|
||||||
end note
|
end note
|
||||||
|
|
||||||
note right of Config::getUikit
|
note left of Config::getUikit
|
||||||
The Uikit switch
|
The Uikit switch
|
||||||
|
|
||||||
since: 3.2.0
|
since: 3.2.0
|
||||||
return: int
|
return: int
|
||||||
end note
|
end note
|
||||||
|
|
||||||
note left of Config::getGooglechart
|
note right of Config::getGooglechart
|
||||||
The google chart switch
|
The google chart switch
|
||||||
|
|
||||||
since: 3.2.0
|
since: 3.2.0
|
||||||
return: bool
|
return: bool
|
||||||
end note
|
end note
|
||||||
|
|
||||||
note right of Config::getFootable
|
note left of Config::getFootable
|
||||||
The footable switch
|
The footable switch
|
||||||
|
|
||||||
since: 3.2.0
|
since: 3.2.0
|
||||||
return: bool
|
return: bool
|
||||||
end note
|
end note
|
||||||
|
|
||||||
note left of Config::getFootableversion
|
note right of Config::getFootableversion
|
||||||
The footable version
|
The footable version
|
||||||
|
|
||||||
since: 3.2.0
|
since: 3.2.0
|
||||||
return: int
|
return: int
|
||||||
end note
|
end note
|
||||||
|
|
||||||
note right of Config::getPermissionstrictperfield
|
note left of Config::getPermissionstrictperfield
|
||||||
The Permission Strict Per Field Switch
|
The Permission Strict Per Field Switch
|
||||||
|
|
||||||
since: 3.2.0
|
since: 3.2.0
|
||||||
return: bool
|
return: bool
|
||||||
end note
|
end note
|
||||||
|
|
||||||
note left of Config::getExporttextonly
|
note right of Config::getExporttextonly
|
||||||
The Export Text Only Switch
|
The Export Text Only Switch
|
||||||
|
|
||||||
since: 3.2.0
|
since: 3.2.0
|
||||||
|
@ -293,6 +293,24 @@ class Config extends BaseConfig
|
|||||||
return strlen((string) $this->component_code_name);
|
return strlen((string) $this->component_code_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* get component autoloader path
|
||||||
|
*
|
||||||
|
* @return string The component autoloader path
|
||||||
|
* @since 3.2.0
|
||||||
|
*/
|
||||||
|
protected function getComponentautoloaderpath(): string
|
||||||
|
{
|
||||||
|
if ($this->joomla_version == 3)
|
||||||
|
{
|
||||||
|
return 'helpers/powerloader.php';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return 'src/Helper/PowerloaderHelper.php';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* get add namespace prefix
|
* get add namespace prefix
|
||||||
*
|
*
|
||||||
|
@ -259,6 +259,24 @@
|
|||||||
return strlen((string) $this->component_code_name);
|
return strlen((string) $this->component_code_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* get component autoloader path
|
||||||
|
*
|
||||||
|
* @return string The component autoloader path
|
||||||
|
* @since 3.2.0
|
||||||
|
*/
|
||||||
|
protected function getComponentautoloaderpath(): string
|
||||||
|
{
|
||||||
|
if ($this->joomla_version == 3)
|
||||||
|
{
|
||||||
|
return 'helpers/powerloader.php';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return 'src/Helper/PowerloaderHelper.php';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* get add namespace prefix
|
* get add namespace prefix
|
||||||
*
|
*
|
||||||
|
Loading…
Reference in New Issue
Block a user