Moves all major structre function to container. Adds new Server replacment class for legacy calls. Refactored multiple classes. Add more advanced compiler options, with donation notice.

This commit is contained in:
2023-02-12 21:15:41 +02:00
parent 7fa8964b44
commit 339aec221e
58 changed files with 4552 additions and 1755 deletions

View File

@@ -101,6 +101,17 @@ class Config extends BaseConfig
return false; // default is false
}
/**
* get add checkin
*
* @return bool add checkin switch
* @since 3.2.0
*/
protected function getAddcheckin(): bool
{
return false; // default is false
}
/**
* get posted component id
*
@@ -169,7 +180,7 @@ class Config extends BaseConfig
*/
protected function getJoomlaversion(): int
{
return $this->input->post->get('joomla_version', 3, 'INT');
return 3; // $this->input->post->get('joomla_version', 3, 'INT');
}
/**
@@ -208,6 +219,17 @@ class Config extends BaseConfig
return false;
}
/**
* get show advanced options switch
*
* @return bool show advanced options
* @since 3.2.0
*/
protected function getShowadvancedoptions(): bool
{
return (bool) $this->input->post->get('show_advanced_options', 0, 'INT');
}
/**
* get indentation value
*
@@ -216,7 +238,60 @@ class Config extends BaseConfig
*/
protected function getIndentationvalue(): string
{
return "\t"; // TODO add to GUI as an Global Option?
// if advanced options is active
if ($this->show_advanced_options)
{
$indentation_value = $this->input->post->get('indentation_value', 1, 'INT');
switch($indentation_value)
{
case 2:
// two spaces
return " ";
break;
case 4:
// four spaces
return " ";
break;
}
}
return "\t";
}
/**
* get add build date switch
*
* @return int add build date options
* @since 3.2.0
*/
protected function getAddbuilddate(): int
{
// if advanced options is active
if ($this->show_advanced_options)
{
// 1=default 2=manual 3=component
return $this->input->post->get('add_build_date', 1, 'INT');
}
return 1;
}
/**
* get build date
*
* @return string build date
* @since 3.2.0
*/
protected function getBuilddate(): string
{
// if advanced options is active and manual date selected
if ($this->show_advanced_options && $this->add_build_date == 2)
{
return $this->input->post->get('build_date', 'now', 'STRING');
}
return "now";
}
/**