update 2024-04-25 16:46:58

This commit is contained in:
Robot 2024-04-25 16:46:58 +02:00
parent 0c98ab5bb5
commit de1a49f601
Signed by: Robot
GPG Key ID: 14DECD44E7E1BB95
6 changed files with 207 additions and 334 deletions

View File

@ -16,13 +16,10 @@ class Autoloader #Gold {
# Content $content
# string $helper
+ __construct(Power $power, Config $config, ...)
+ setFiles() : void
+ set() : void
- loadPluginAutoloader() : bool
- loadHelperAutoloader() : bool
- loadSiteAutoloader() : bool
- getPluginAutoloader() : string
- getHelperAutoloader() : string
- getBLockSiteLoading() : ?string
- getAutoloaderFile(int $tabSpace, string $area = 'JPATH_ADMINISTRATOR') : ?string
- getAutoloader(int $tabSpace) : ?string
- getComposer(int $tabSpace) : ?string
}
@ -38,39 +35,18 @@ note right of Autoloader::__construct
Content $content
end note
note left of Autoloader::set
note right of Autoloader::setFiles
Set the autoloader into the active content array
since: 3.2.0
return: void
end note
note right of Autoloader::loadPluginAutoloader
Should we load the plugin autoloader
note right of Autoloader::set
Set the autoloader into the active content array
since: 3.2.0
return: bool
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
return: void
end note
note right of Autoloader::getHelperAutoloader
@ -80,11 +56,10 @@ note right of Autoloader::getHelperAutoloader
return: string
end note
note left of Autoloader::getBLockSiteLoading
Get code that will block the plugin from loading
the autoloader in the site area
note right of Autoloader::getAutoloaderFile
Get autoloader file
since: 3.2.0
since: 3.2.1
return: ?string
end note
@ -95,7 +70,7 @@ note right of Autoloader::getAutoloader
return: ?string
end note
note left of Autoloader::getComposer
note right of Autoloader::getComposer
Get the composer autoloader routine
since: 3.2.0

View File

@ -77,7 +77,27 @@ class Autoloader
// reset all autoloaders power placeholders
$this->content->set('ADMIN_POWER_HELPER', '');
$this->content->set('SITE_POWER_HELPER', '');
$this->content->set('PLUGIN_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()
{
// 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
* so that the search do not mistakenly match a shorter namespace before a longer one
* that has the same short namespace for example:
@ -102,110 +122,18 @@ class Autoloader
* ^^^^^^^^^^^^^^^^^^^^^^
* NameSpace\SubName\SubSubName\ClassName
* ^^^^^^^^^^^^^^^^^^^^^^
***********************************************************************************************/
** *********************************************************************************************/
uksort($this->power->namespace, fn($a, $b) => strlen((string) $b) - strlen((string) $a));
// check if we are using a plugin
if ($this->loadPluginAutoloader())
{
$this->content->set('PLUGIN_POWER_AUTOLOADER', $this->getPluginAutoloader());
}
// load to admin helper class
$this->content->add('ADMIN_POWER_HELPER', $this->getHelperAutoloader());
// load to the helper class
if ($this->loadHelperAutoloader())
{
// 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());
// load to site helper class if needed
$this->content->add('SITE_POWER_HELPER', $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
*
@ -245,30 +173,29 @@ class Autoloader
}
/**
* Get code that will block the plugin from loading
* the autoloader in the site area
* Get autoloader file
*
* @param int $tabSpace The dynamic tab spacer
* @param string $area The target area
*
* @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
if (!$this->loadSiteAutoloader())
{
// we add code to prevent this plugin from triggering on the site area
$not_site = [];
$not_site[] = Indent::_(2) . '//'
. Line::_(__Line__, __Class__) . ' do not run the autoloader in the site area';
$not_site[] = Indent::_(2) . 'if ($this->app->isClient(\'site\'))';
$not_site[] = Indent::_(2) . '{';
$not_site[] = Indent::_(3) . 'return;';
$not_site[] = Indent::_(2) . '}';
// we start building the autoloaded file loader
$autoload_file = [];
$autoload_file[] = Indent::_($tabSpace) . '//'
. Line::_(__Line__, __Class__) . ' The power autoloader for this project admin area.';
$autoload_file[] = Indent::_($tabSpace) . "\$power_autoloader = $area . '/componenents/com_"
. $this->config->get('component_code_name', 'ERROR') . '/'
. $this->config->get('component_autoloader_path', 'ERROR') . "';";
$autoload_file[] = Indent::_($tabSpace) . 'if (file_exists($power_autoloader))';
$autoload_file[] = Indent::_($tabSpace) . '{';
$autoload_file[] = Indent::_($tabSpace) . Indent::_(1) . 'require_once $power_autoloader;';
$autoload_file[] = Indent::_($tabSpace) . '}';
return implode(PHP_EOL, $not_site);
}
return null;
return implode(PHP_EOL, $autoload_file);
}
/**
@ -287,7 +214,7 @@ class Autoloader
$autoload_method = [];
$autoload_method[] = Indent::_($tabSpace) . '//'
. 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) . '//'
. Line::_(__Line__, __Class__) . ' project-specific base directories and namespace prefix';
$autoload_method[] = Indent::_($tabSpace) . Indent::_(1) . '$search = [';

View File

@ -48,7 +48,27 @@
// reset all autoloaders power placeholders
$this->content->set('ADMIN_POWER_HELPER', '');
$this->content->set('SITE_POWER_HELPER', '');
$this->content->set('PLUGIN_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()
{
// 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
* so that the search do not mistakenly match a shorter namespace before a longer one
* that has the same short namespace for example:
@ -73,110 +93,18 @@
* ^^^^^^^^^^^^^^^^^^^^^^
* NameSpace\SubName\SubSubName\ClassName
* ^^^^^^^^^^^^^^^^^^^^^^
***********************************************************************************************/
** *********************************************************************************************/
uksort($this->power->namespace, fn($a, $b) => strlen((string) $b) - strlen((string) $a));
// check if we are using a plugin
if ($this->loadPluginAutoloader())
{
$this->content->set('PLUGIN_POWER_AUTOLOADER', $this->getPluginAutoloader());
}
// load to admin helper class
$this->content->add('ADMIN_POWER_HELPER', $this->getHelperAutoloader());
// load to the helper class
if ($this->loadHelperAutoloader())
{
// 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());
// load to site helper class if needed
$this->content->add('SITE_POWER_HELPER', $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
*
@ -216,30 +144,29 @@
}
/**
* Get code that will block the plugin from loading
* the autoloader in the site area
* Get autoloader file
*
* @param int $tabSpace The dynamic tab spacer
* @param string $area The target area
*
* @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
if (!$this->loadSiteAutoloader())
{
// we add code to prevent this plugin from triggering on the site area
$not_site = [];
$not_site[] = Indent::_(2) . '//'
. Line::_(__Line__, __Class__) . ' do not run the autoloader in the site area';
$not_site[] = Indent::_(2) . 'if ($this->app->isClient(\'site\'))';
$not_site[] = Indent::_(2) . '{';
$not_site[] = Indent::_(3) . 'return;';
$not_site[] = Indent::_(2) . '}';
// we start building the autoloaded file loader
$autoload_file = [];
$autoload_file[] = Indent::_($tabSpace) . '//'
. Line::_(__Line__, __Class__) . ' The power autoloader for this project admin area.';
$autoload_file[] = Indent::_($tabSpace) . "\$power_autoloader = $area . '/componenents/com_"
. $this->config->get('component_code_name', 'ERROR') . '/'
. $this->config->get('component_autoloader_path', 'ERROR') . "';";
$autoload_file[] = Indent::_($tabSpace) . 'if (file_exists($power_autoloader))';
$autoload_file[] = Indent::_($tabSpace) . '{';
$autoload_file[] = Indent::_($tabSpace) . Indent::_(1) . 'require_once $power_autoloader;';
$autoload_file[] = Indent::_($tabSpace) . '}';
return implode(PHP_EOL, $not_site);
}
return null;
return implode(PHP_EOL, $autoload_file);
}
/**
@ -258,7 +185,7 @@
$autoload_method = [];
$autoload_method[] = Indent::_($tabSpace) . '//'
. 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) . '//'
. Line::_(__Line__, __Class__) . ' project-specific base directories and namespace prefix';
$autoload_method[] = Indent::_($tabSpace) . Indent::_(1) . '$search = [';

View File

@ -30,6 +30,7 @@ class Config #Gold {
# getComponentcodename() : string
# getComponentcontext() : string
# getComponentcodenamelength() : int
# getComponentautoloaderpath() : string
# getAddnamespaceprefix() : bool
# getNamespaceprefix() : string
# getJoomlaversion() : int
@ -214,413 +215,420 @@ note right of Config::getComponentcodenamelength
return: int
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
since: 3.2.0
return: bool
end note
note right of Config::getNamespaceprefix
note left of Config::getNamespaceprefix
get namespace prefix
since: 3.2.0
return: string
end note
note left of Config::getJoomlaversion
note right of Config::getJoomlaversion
get posted Joomla version
since: 3.2.0
return: int
end note
note right of Config::getJoomlaversions
note left of Config::getJoomlaversions
get Joomla versions
since: 3.2.0
return: array
end note
note left of Config::getJoomlaversionname
note right of Config::getJoomlaversionname
get posted Joomla version name
since: 3.2.0
return: string
end note
note right of Config::getSetjoomlafields
note left of Config::getSetjoomlafields
set joomla fields
since: 3.2.0
return: bool
end note
note left of Config::getShowadvancedoptions
note right of Config::getShowadvancedoptions
get show advanced options switch
since: 3.2.0
return: bool
end note
note right of Config::getIndentationvalue
note left of Config::getIndentationvalue
get indentation value
since: 3.2.0
return: string
end note
note left of Config::getAddbuilddate
note right of Config::getAddbuilddate
get add build date switch
since: 3.2.0
return: int
end note
note right of Config::getBuilddate
note left of Config::getBuilddate
get build date
since: 3.2.0
return: string
end note
note left of Config::getBackup
note right of Config::getBackup
get posted backup switch
since: 3.2.0
return: int
end note
note right of Config::getRepository
note left of Config::getRepository
get posted repository switch
since: 3.2.0
return: int
end note
note left of Config::getDebuglinenr
note right of Config::getDebuglinenr
get posted debuglinenr switch
since: 3.2.0
return: int
end note
note right of Config::getMinify
note left of Config::getMinify
get posted minify switch
since: 3.2.0
return: int
end note
note left of Config::getRemovelinebreaks
note right of Config::getRemovelinebreaks
get posted remove line breaks switch
since: 3.2.0
return: bool
end note
note right of Config::getTidy
note left of Config::getTidy
get system tidy state
since: 3.2.0
return: bool
end note
note left of Config::getSettidywarning
note right of Config::getSettidywarning
add tidy warning
since: 3.2.0
return: bool
end note
note right of Config::getSettaghistory
note left of Config::getSettaghistory
get history tag switch
since: 3.2.0
return: bool
end note
note left of Config::getPercentagelanguageadd
note right of Config::getPercentagelanguageadd
get percentage when a language should be added
since: 3.2.0
return: int
end note
note right of Config::getLangtag
note left of Config::getLangtag
get language tag
since: 3.2.0
return: string
end note
note left of Config::getLangprefix
note right of Config::getLangprefix
get language prefix
since: 3.2.0
return: string
end note
note right of Config::getLangtarget
note left of Config::getLangtarget
get language target
since: 3.2.0
return: string
end note
note left of Config::getLangstringtargets
note right of Config::getLangstringtargets
get language string targets
since: 3.2.0
return: array
end note
note right of Config::getLangstringkeytargets
note left of Config::getLangstringkeytargets
get language string targets (by key name)
since: 3.2.0
return: array
end note
note left of Config::getFieldbuildertype
note right of Config::getFieldbuildertype
get field builder type
since: 3.2.0
return: int
end note
note right of Config::getDefaultfields
note left of Config::getDefaultfields
get default fields
since: 3.2.0
return: array
end note
note left of Config::getTmppath
note right of Config::getTmppath
get temporary path
since: 3.2.0
return: string
end note
note right of Config::getCompilerpath
note left of Config::getCompilerpath
get compiler path
since: 3.2.0
return: string
end note
note left of Config::getJcbpowerspath
note right of Config::getJcbpowerspath
get jcb powers path
since: 3.2.0
return: string
end note
note right of Config::getPowerlibraryfolder
note left of Config::getPowerlibraryfolder
get jcb powers path
since: 3.2.0
return: string
end note
note left of Config::getLocalpowersrepositorypath
note right of Config::getLocalpowersrepositorypath
Get local super powers repository path
since: 3.2.0
return: string
end note
note right of Config::getApprovedpaths
note left of Config::getApprovedpaths
Get super power approved paths
since: 3.2.0
return: array
end note
note left of Config::getJoomlapowerscoreorganisation
note right of Config::getJoomlapowerscoreorganisation
Get super power core organisation
since: 3.2.0
return: string
end note
note right of Config::getJoomlapowersinitrepos
note left of Config::getJoomlapowersinitrepos
Get Joomla power init repos
since: 3.2.0
return: array
end note
note left of Config::getLocaljoomlapowersrepositorypath
note right of Config::getLocaljoomlapowersrepositorypath
Get local joomla super powers repository path
since: 3.2.0
return: string
end note
note right of Config::getApprovedjoomlapaths
note left of Config::getApprovedjoomlapaths
Get joomla power approved paths
since: 3.2.0
return: array
end note
note left of Config::getBompath
note right of Config::getBompath
get bom path
since: 3.2.0
return: string
end note
note right of Config::getCustomfolderpath
note left of Config::getCustomfolderpath
get custom folder path
since: 3.2.0
return: string
end note
note left of Config::getAddassetstablefix
note right of Config::getAddassetstablefix
get switch to add assets table fix
since: 3.2.0
return: int
end note
note right of Config::getAddassetstablenamefix
note left of Config::getAddassetstablenamefix
get switch to add assets table name fix
since: 3.2.0
return: bool
end note
note left of Config::getAccessworsecase
note right of Config::getAccessworsecase
get access worse case size
since: 3.2.0
return: int
end note
note right of Config::getMysqltablekeys
note left of Config::getMysqltablekeys
get mysql table keys
since: 3.2.0
return: array
end note
note left of Config::getAddplaceholders
note right of Config::getAddplaceholders
get switch add placeholders
since: 3.2.0
return: bool
end note
note right of Config::getAddpower
note left of Config::getAddpower
get switch add power
since: 3.2.0
return: bool
end note
note left of Config::getAddsuperpowers
note right of Config::getAddsuperpowers
Get switch to add super powers
since: 3.2.0
return: bool
end note
note right of Config::getAddownpowers
note left of Config::getAddownpowers
Get switch to add own super powers
since: 3.2.0
return: bool
end note
note left of Config::getBuildtarget
note right of Config::getBuildtarget
get switch build target switch
since: 3.2.0
return: string
end note
note right of Config::getCryptiontypes
note left of Config::getCryptiontypes
get encryption types
since: 3.2.0
return: array
end note
note left of Config::getBasicencryption
note right of Config::getBasicencryption
get basic encryption switch
since: 3.2.0
return: bool
end note
note right of Config::getMediumencryption
note left of Config::getMediumencryption
get medium encryption switch
since: 3.2.0
return: bool
end note
note left of Config::getWhmcsencryption
note right of Config::getWhmcsencryption
get whmcs encryption switch
since: 3.2.0
return: bool
end note
note right of Config::getRemovesitefolder
note left of Config::getRemovesitefolder
Should we remove the site folder
since: 3.2.0
return: bool
end note
note left of Config::getRemovesiteeditfolder
note right of Config::getRemovesiteeditfolder
Should we remove the site edit folder
since: 3.2.0
return: bool
end note
note right of Config::getUikit
note left of Config::getUikit
The Uikit switch
since: 3.2.0
return: int
end note
note left of Config::getGooglechart
note right of Config::getGooglechart
The google chart switch
since: 3.2.0
return: bool
end note
note right of Config::getFootable
note left of Config::getFootable
The footable switch
since: 3.2.0
return: bool
end note
note left of Config::getFootableversion
note right of Config::getFootableversion
The footable version
since: 3.2.0
return: int
end note
note right of Config::getPermissionstrictperfield
note left of Config::getPermissionstrictperfield
The Permission Strict Per Field Switch
since: 3.2.0
return: bool
end note
note left of Config::getExporttextonly
note right of Config::getExporttextonly
The Export Text Only Switch
since: 3.2.0

View File

@ -293,6 +293,24 @@ class Config extends BaseConfig
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
*

View File

@ -259,6 +259,24 @@
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
*