|
Bearsampp 2026.3.26
API documentation
|
Static Public Member Functions | |
| static | process () |
Private Member Functions | |
| __construct () | |
Static Private Member Functions | |
| static | getTab ($title, $icon, $shell, $initDir) |
| static | getTabCmdSection () |
| static | getTabComposerSection () |
| static | getTabGhostscriptSection () |
| static | getTabGitSection () |
| static | getTabMariadbSection () |
| static | getTabMysqlSection () |
| static | getTabNgrokSection () |
| static | getTabNodejsSection () |
| static | getTabPearSection () |
| static | getTabPerlSection () |
| static | getTabPostgresqlSection () |
| static | getTabPowerShellSection () |
| static | getTabPythonSection () |
| static | getTabRubySection () |
| static | getTabsSection () |
Class TplPowerShell
This class is responsible for managing PowerShell configuration. It includes methods to define various sections such as tabs for different tools.
Definition at line 16 of file class.tpl.powershell.php.
|
private |
Private constructor to prevent instantiation.
Definition at line 40 of file class.tpl.powershell.php.
|
staticprivate |
Generates the structure for a tab.
This function constructs the structure for a tab, including the title, shell command, and initial directory.
Note: Icon parameter is currently unused as native PowerShell consoles do not support custom icons in tab titles. This was a feature of ConsoleZ which is no longer used. To use icons, consider using a terminal emulator like ConEmu, Cmder, or Windows Terminal.
| string | $title | The title of the tab. |
| string | null | $icon | The icon for the tab (currently unused). |
| string | $shell | The shell command to be executed in the tab. |
| string | $initDir | The initial directory for the tab. |
Definition at line 517 of file class.tpl.powershell.php.
References $bearsamppCore.
Referenced by getTabCmdSection(), getTabComposerSection(), getTabGhostscriptSection(), getTabGitSection(), getTabMariadbSection(), getTabMysqlSection(), getTabNgrokSection(), getTabNodejsSection(), getTabPearSection(), getTabPerlSection(), getTabPostgresqlSection(), getTabPowerShellSection(), getTabPythonSection(), and getTabRubySection().
|
staticprivate |
Generates the structure for the command tab section.
This function creates a structure defining the command tab and its configuration. It retrieves the tab title and shell command from the PowerShell tool and sets the root path.
@global Root $bearsamppRoot The root object of the application.
Definition at line 95 of file class.tpl.powershell.php.
References $bearsamppRoot, and getTab().
Referenced by getTabsSection().
|
staticprivate |
Generates the structure for the Composer tab section.
This function creates a structure defining the Composer tab and its configuration. It retrieves the Composer executable path and sets the WWW path.
@global Root $bearsamppRoot The root object of the application.
Definition at line 323 of file class.tpl.powershell.php.
References $bearsamppRoot, and getTab().
Referenced by getTabsSection().
|
staticprivate |
Generates the tab section for Ghostscript in the console.
This function constructs a shell command to check the version of Ghostscript and verifies if the executable exists. If the executable is not found, it returns a message indicating the absence of the executable. It then creates a tab section with the appropriate title, icon, shell command, and initial directory.
Definition at line 453 of file class.tpl.powershell.php.
References $bearsamppRoot, and getTab().
Referenced by getTabsSection().
|
staticprivate |
Generates the structure for the Git tab section.
This function creates a structure defining the Git tab and its configuration. It retrieves the Git executable path and sets the WWW path.
@global Root $bearsamppRoot The root object of the application.
Definition at line 266 of file class.tpl.powershell.php.
References $bearsamppRoot, and getTab().
Referenced by getTabsSection().
|
staticprivate |
Generates the structure for the MariaDB tab section.
This function creates a structure defining the MariaDB tab and its configuration. It retrieves the MariaDB CLI executable path and sets the symlink path.
@global Bins $bearsamppBins The bins object of the application.
Definition at line 204 of file class.tpl.powershell.php.
References $bearsamppBins, and getTab().
Referenced by getTabsSection().
|
staticprivate |
Generates the structure for the MySQL tab section.
This function creates a structure defining the MySQL tab and its configuration. It retrieves the MySQL CLI executable path and sets the symlink path.
@global Bins $bearsamppBins The bins object of the application.
Definition at line 174 of file class.tpl.powershell.php.
References $bearsamppBins, and getTab().
Referenced by getTabsSection().
|
staticprivate |
Generates the tab section for Ngrok in the console.
This function constructs a shell command to check the version of Ngrok and verifies if the executable exists. If the executable is not found, it returns a message indicating the absence of the executable. It then creates a tab section with the appropriate title, icon, shell command, and initial directory.
Definition at line 483 of file class.tpl.powershell.php.
References $bearsamppRoot, and getTab().
Referenced by getTabsSection().
|
staticprivate |
Generates the structure for the Node.js tab section.
This function creates a structure defining the Node.js tab and its configuration. It retrieves the Node.js launch path and sets the WWW path.
@global Root $bearsamppRoot The root object of the application.
Definition at line 295 of file class.tpl.powershell.php.
References $bearsamppBins, $bearsamppRoot, and getTab().
Referenced by getTabsSection().
|
staticprivate |
Generates the structure for the PEAR tab section.
This function creates a structure defining the PEAR tab and its configuration. It retrieves the PEAR executable path and sets the symlink path.
@global Bins $bearsamppBins The bins object of the application.
Definition at line 146 of file class.tpl.powershell.php.
References $bearsamppBins, and getTab().
Referenced by getTabsSection().
|
staticprivate |
Generates the structure for the Perl tab section.
This function creates a structure defining the Perl tab and its configuration. It retrieves the Perl executable path and sets the WWW path.
@global Root $bearsamppRoot The root object of the application.
Definition at line 423 of file class.tpl.powershell.php.
References $bearsamppRoot, and getTab().
Referenced by getTabsSection().
|
staticprivate |
Generates the structure for the PostgreSQL tab section.
This function creates a structure defining the PostgreSQL tab and its configuration. It retrieves the PostgreSQL CLI executable path and sets the symlink path.
@global Bins $bearsamppBins The bins object of the application.
Definition at line 234 of file class.tpl.powershell.php.
References $bearsamppBins, and getTab().
Referenced by getTabsSection().
|
staticprivate |
Generates the structure for the PowerShell tab section.
This function creates a structure defining the PowerShell tab and its configuration. It retrieves the PowerShell path and sets the root path.
@global Root $bearsamppRoot The root object of the application.
Definition at line 118 of file class.tpl.powershell.php.
References $bearsamppRoot, Util\getPowerShellPath(), and getTab().
Referenced by getTabsSection().
|
staticprivate |
Generates the structure for the Python tab section.
This function creates a structure defining the Python tab and its configuration. It retrieves the Python executable path and sets the WWW path.
@global Root $bearsamppRoot The root object of the application.
Definition at line 351 of file class.tpl.powershell.php.
References $bearsamppRoot, and getTab().
Referenced by getTabsSection().
|
staticprivate |
Generates the structure for the Ruby tab section.
This function creates a structure defining the Ruby tab and its configuration. It retrieves the Ruby executable path and sets the WWW path.
@global Root $bearsamppRoot The root object of the application.
Definition at line 379 of file class.tpl.powershell.php.
References $bearsamppRoot, and getTab().
Referenced by getTabsSection().
|
staticprivate |
Generates the tabs section.
This function creates a structure defining various tabs and their configurations. It includes multiple tab sections such as command, PowerShell, PEAR, MySQL, MariaDB, PostgreSQL, Ghostscript, Git, Node.js, Composer, Perl, Python, Ruby and Ngrok.
Definition at line 66 of file class.tpl.powershell.php.
References getTabCmdSection(), getTabComposerSection(), getTabGhostscriptSection(), getTabGitSection(), getTabMariadbSection(), getTabMysqlSection(), getTabNgrokSection(), getTabNodejsSection(), getTabPearSection(), getTabPerlSection(), getTabPostgresqlSection(), getTabPowerShellSection(), getTabPythonSection(), and getTabRubySection().
|
static |
Process PowerShell configuration.
PowerShell 7+ uses profile scripts and Oh My Posh for configuration, not XML like ConsoleZ. This method is maintained for compatibility.
Definition at line 50 of file class.tpl.powershell.php.
Referenced by ActionReload\__construct().