2024.8.23
Loading...
Searching...
No Matches
TplApp Class Reference

Static Public Member Functions

static getActionExec ()
 
static getActionMulti ($action, $args=array(), $item=array(), $disabled=false, $class=false)
 
static getActionRun ($action, $args=array(), $item=array(), $waitUntilTerminated=true)
 
static getMenu ($caption, $menu, $class)
 
static getMenuEnable ($caption, $menu, $class, $enabled=true)
 
static getSectionContent ($name, $class, $args=array())
 
static getSectionName ($name, $args=array())
 
static process ()
 
static processLight ()
 

Data Fields

const ITEM_CAPTION = 0
 
const ITEM_GLYPH = 1
 
const SECTION_CALL = 0
 
const SECTION_CONTENT = 1
 

Private Member Functions

 __construct ()
 

Static Private Member Functions

static getSectionMenuLeft ()
 
static getSectionMenuRight ()
 
static getSectionServices ()
 
static getSectionStartupAction ()
 

Detailed Description

Class TplApp

This class provides various methods to generate and manage menu items, actions, and sections within the Bearsampp application. It includes functionalities for creating and processing different sections, running actions, and generating menus with various options.

Definition at line 17 of file class.tpl.app.php.

Constructor & Destructor Documentation

◆ __construct()

TplApp::__construct ( )
private

Private constructor to prevent instantiation.

Definition at line 29 of file class.tpl.app.php.

30 {
31 }

Member Function Documentation

◆ getActionExec()

static TplApp::getActionExec ( )
static

Generates an action string to execute a specific action.

Returns
string The generated action string.

Definition at line 176 of file class.tpl.app.php.

177 {
178 return self::getActionRun(Action::EXEC, array(), array(), false);
179 }
const EXEC
static getActionRun($action, $args=array(), $item=array(), $waitUntilTerminated=true)

References Action\EXEC, and getActionRun().

Referenced by getSectionStartupAction().

+ Here is the caller graph for this function:

◆ getActionMulti()

static TplApp::getActionMulti ( $action,
$args = array(),
$item = array(),
$disabled = false,
$class = false )
static

Generates a multi-action string for a specific action.

Parameters
string$actionThe action to run.
array$argsOptional arguments for the action.
array$itemOptional item details for the action.
bool$disabledWhether the action is disabled.
string$classThe class name containing the method to generate the section content.
Returns
array An array containing the call string and the section content.

Definition at line 152 of file class.tpl.app.php.

153 {
154 $action = 'action' . ucfirst($action);
155 $args = $args == null ? array() : $args;
156 $sectionName = self::getSectionName($action, $args);
157
158 $call = 'Action: multi; Actions: ' . $sectionName;
159
160 if (!empty($item)) {
161 $call = 'Type: item; ' . $call .
162 '; Caption: "' . $item[self::ITEM_CAPTION] . '"' .
163 (!empty($item[self::ITEM_GLYPH]) ? '; Glyph: "' . $item[self::ITEM_GLYPH] . '"' : '');
164 } else {
165 $call .= '; Flags: waituntilterminated';
166 }
167
168 return array($call, self::getSectionContent($action, $class, $args));
169 }
const ITEM_CAPTION
static getSectionName($name, $args=array())
const ITEM_GLYPH

References getSectionName(), ITEM_CAPTION, and ITEM_GLYPH.

Referenced by TplAppApache\getMenuApache(), TplAppApache\getMenuApacheAlias(), TplAppApache\getMenuApacheModules(), TplAppApache\getMenuApacheService(), TplAppApache\getMenuApacheVersions(), TplAppApache\getMenuApacheVhosts(), TplAppFilezilla\getMenuFilezilla(), TplAppFilezilla\getMenuFilezillaService(), TplAppFilezilla\getMenuFilezillaVersions(), TplAppGit\getMenuGit(), TplAppLang\getMenuLang(), TplAppLogsVerbose\getMenuLogsVerbose(), TplAppMailhog\getMenuMailhog(), TplAppMailhog\getMenuMailhogService(), TplAppMailhog\getMenuMailhogVersions(), TplAppMailpit\getMenuMailpit(), TplAppMailpit\getMenuMailpitService(), TplAppMailpit\getMenuMailpitVersions(), TplAppMariadb\getMenuMariadb(), TplAppMariadb\getMenuMariadbService(), TplAppMariadb\getMenuMariadbVersions(), TplAppMemcached\getMenuMemcached(), TplAppMemcached\getMenuMemcachedService(), TplAppMemcached\getMenuMemcachedVersions(), TplAppMysql\getMenuMysql(), TplAppMysql\getMenuMysqlService(), TplAppMysql\getMenuMysqlVersions(), TplAppNodejs\getMenuNodejs(), TplAppNodejs\getMenuNodejsVersions(), TplAppPhp\getMenuPhp(), TplAppPhp\getMenuPhpExtensions(), TplAppPhp\getMenuPhpSettings(), TplAppPhp\getMenuPhpVersions(), TplAppPostgresql\getMenuPostgresql(), TplAppPostgresql\getMenuPostgresqlService(), TplAppPostgresql\getMenuPostgresqlVersions(), TplAppTools\getMenuTools(), TplAppXlight\getMenuXlight(), TplAppXlight\getMenuXlightService(), TplAppXlight\getMenuXlightVersions(), TplAppPhp\getSubmenuPhpSettings(), TplAppBrowser\process(), TplAppExit\process(), TplAppLaunchStartup\process(), TplAppOnline\process(), TplAppReload\process(), and TplAppServices\process().

+ Here is the caller graph for this function:

◆ getActionRun()

static TplApp::getActionRun ( $action,
$args = array(),
$item = array(),
$waitUntilTerminated = true )
static

Generates an action string to run a specific action.

Parameters
string$actionThe action to run.
array$argsOptional arguments for the action.
array$itemOptional item details for the action.
bool$waitUntilTerminatedWhether to wait until the action is terminated.

@global object $bearsamppRoot Provides access to the root directory of the application. @global object $bearsamppCore Provides access to core functionalities and configurations.

Returns
string The generated action string.

Definition at line 115 of file class.tpl.app.php.

116 {
118 $args = $args == null ? array() : $args;
119
120 $argImp = '';
121 foreach ($args as $arg) {
122 $argImp .= ' ' . base64_encode($arg);
123 }
124
125 $result = 'Action: run; ' .
126 'FileName: "' . $bearsamppCore->getPhpExe(true) . '"; ' .
127 'Parameters: "' . Core::isRoot_FILE . ' ' . $action . $argImp . '"; ' .
128 'WorkingDir: "' . $bearsamppRoot->getCorePath(true) . '"';
129
130 if (!empty($item)) {
131 $result = 'Type: item; ' . $result .
132 '; Caption: "' . $item[self::ITEM_CAPTION] . '"' .
133 (!empty($item[self::ITEM_GLYPH]) ? '; Glyph: "' . $item[self::ITEM_GLYPH] . '"' : '');
134 } elseif ($waitUntilTerminated) {
135 $result .= '; Flags: waituntilterminated';
136 }
137
138 return $result;
139 }
$result
global $bearsamppRoot
global $bearsamppCore
const isRoot_FILE

References $bearsamppCore, $bearsamppRoot, $result, Core\isRoot_FILE, ITEM_CAPTION, and ITEM_GLYPH.

Referenced by TplAppApache\getActionAddAlias(), TplAppApache\getActionAddVhost(), TplAppApache\getActionChangeApachePort(), TplAppBrowser\getActionChangeBrowser(), TplAppFilezilla\getActionChangeFilezillaPort(), TplAppMailhog\getActionChangeMailhogPort(), TplAppMailpit\getActionChangeMailpitPort(), TplAppMariadb\getActionChangeMariadbPort(), TplAppMariadb\getActionChangeMariadbRootPwd(), TplAppMemcached\getActionChangeMemcachedPort(), TplAppMysql\getActionChangeMysqlPort(), TplAppMysql\getActionChangeMysqlRootPwd(), TplAppPostgresql\getActionChangePostgresqlPort(), TplAppPostgresql\getActionChangePostgresqlRootPwd(), TplAppXlight\getActionChangeXlightPort(), TplService\getActionCreate(), TplAppApache\getActionEditAlias(), TplAppApache\getActionEditVhost(), TplAppApache\getActionEnableApache(), TplAppFilezilla\getActionEnableFilezilla(), TplAppMailhog\getActionEnableMailhog(), TplAppMailpit\getActionEnableMailpit(), TplAppMariadb\getActionEnableMariadb(), TplAppMemcached\getActionEnableMemcached(), TplAppMysql\getActionEnableMysql(), TplAppNodejs\getActionEnableNodejs(), TplAppPhp\getActionEnablePhp(), TplAppPostgresql\getActionEnablePostgresql(), TplAppXlight\getActionEnableXlight(), getActionExec(), TplAppExit\getActionExit(), TplAppTools\getActionGenSslCertificate(), TplService\getActionInstall(), TplAppApache\getActionInstallApacheService(), TplAppFilezilla\getActionInstallFilezillaService(), TplAppMailhog\getActionInstallMailhogService(), TplAppMailpit\getActionInstallMailpitService(), TplAppMariadb\getActionInstallMariadbService(), TplAppMemcached\getActionInstallMemcachedService(), TplAppMysql\getActionInstallMysqlService(), TplAppPostgresql\getActionInstallPostgresqlService(), TplAppXlight\getActionInstallXlightService(), TplAppLaunchStartup\getActionLaunchStartup(), TplAppGit\getActionRefreshGitRepos(), TplAppGit\getActionRefreshGitReposStartup(), TplAppReload\getActionReload(), TplService\getActionRemove(), TplAppApache\getActionRemoveApacheService(), TplAppFilezilla\getActionRemoveFilezillaService(), TplAppMailhog\getActionRemoveMailhogService(), TplAppMailpit\getActionRemoveMailpitService(), TplAppMariadb\getActionRemoveMariadbService(), TplAppMemcached\getActionRemoveMemcachedService(), TplAppMysql\getActionRemoveMysqlService(), TplAppPostgresql\getActionRemovePostgresqlService(), TplAppXlight\getActionRemoveXlightService(), TplService\getActionRestart(), TplService\getActionStart(), TplAppOnline\getActionStatus(), TplService\getActionStop(), TplAppApache\getActionSwitchApacheModule(), TplAppApache\getActionSwitchApacheVersion(), TplAppFilezilla\getActionSwitchFilezillaVersion(), TplAppLang\getActionSwitchLang(), TplAppLogsVerbose\getActionSwitchLogsVerbose(), TplAppMailhog\getActionSwitchMailhogVersion(), TplAppMailpit\getActionSwitchMailpitVersion(), TplAppMariadb\getActionSwitchMariadbVersion(), TplAppMemcached\getActionSwitchMemcachedVersion(), TplAppMysql\getActionSwitchMysqlVersion(), TplAppNodejs\getActionSwitchNodejsVersion(), TplAppPhp\getActionSwitchPhpExtension(), TplAppPhp\getActionSwitchPhpSetting(), TplAppPhp\getActionSwitchPhpVersion(), TplAppPostgresql\getActionSwitchPostgresqlVersion(), TplAppXlight\getActionSwitchXlightVersion(), TplService\getItemInstall(), TplService\getItemRemove(), TplService\getItemRestart(), TplService\getItemStart(), TplService\getItemStop(), TplAppApache\getMenuApacheDebug(), TplAppApache\getMenuApacheService(), TplAppFilezilla\getMenuFilezillaService(), TplAppMailhog\getMenuMailhogService(), TplAppMailpit\getMenuMailpitService(), TplAppMariadb\getMenuMariadbDebug(), TplAppMariadb\getMenuMariadbService(), TplAppMemcached\getMenuMemcachedService(), TplAppMysql\getMenuMysqlDebug(), TplAppMysql\getMenuMysqlService(), TplAppPostgresql\getMenuPostgresqlDebug(), TplAppPostgresql\getMenuPostgresqlService(), TplAppXlight\getMenuXlightService(), getSectionMenuRight(), getSectionStartupAction(), TplAppClearFolders\process(), and TplAppRebuildIni\process().

◆ getMenu()

static TplApp::getMenu ( $caption,
$menu,
$class )
static

Generates a menu with the specified caption, menu name, and class.

Parameters
string$captionThe caption for the menu.
string$menuThe name of the menu.
string$classThe class name containing the method to generate the menu content.
Returns
array An array containing the call string and the menu content.

Definition at line 190 of file class.tpl.app.php.

191 {
192 $menu = 'menu' . ucfirst($menu);
193
194 $call = 'Type: submenu; ' .
195 'Caption: "' . $caption . '"; ' .
196 'SubMenu: ' . self::getSectionName($menu) . '; ' .
198
199 return array($call, self::getSectionContent($menu, $class, null));
200 }
const GLYPH_FOLDER_CLOSE

References getSectionName(), and TplAestan\GLYPH_FOLDER_CLOSE.

Referenced by TplAppApache\getMenuApache(), TplAppFilezilla\getMenuFilezilla(), TplAppGit\getMenuGit(), TplAppMailhog\getMenuMailhog(), TplAppMailpit\getMenuMailpit(), TplAppMariadb\getMenuMariadb(), TplAppMemcached\getMenuMemcached(), TplAppMysql\getMenuMysql(), TplAppNodejs\getMenuNodejs(), TplAppPhp\getMenuPhp(), TplAppPostgresql\getMenuPostgresql(), TplAppXlight\getMenuXlight(), TplAppApps\process(), TplAppGit\process(), TplAppLang\process(), TplAppLogs\process(), TplAppLogsVerbose\process(), TplAppPython\process(), and TplAppTools\process().

+ Here is the caller graph for this function:

◆ getMenuEnable()

static TplApp::getMenuEnable ( $caption,
$menu,
$class,
$enabled = true )
static

Generates a menu with the specified caption, menu name, class, and enabled state.

Parameters
string$captionThe caption for the menu.
string$menuThe name of the menu.
string$classThe class name containing the method to generate the menu content.
bool$enabledWhether the menu is enabled.
Returns
array An array containing the call string and the menu content.

Definition at line 212 of file class.tpl.app.php.

213 {
214 $menu = 'menu' . ucfirst($menu);
215
216 $call = 'Type: submenu; ' .
217 'Caption: "' . $caption . '"; ' .
218 'SubMenu: ' . self::getSectionName($menu) . '; ' .
220
221 return array($call, self::getSectionContent($menu, $class, null));
222 }
const GLYPH_FOLDER_DISABLED

References getSectionName(), TplAestan\GLYPH_FOLDER_CLOSE, and TplAestan\GLYPH_FOLDER_DISABLED.

Referenced by TplAppApache\process(), TplAppFilezilla\process(), TplAppMailhog\process(), TplAppMailpit\process(), TplAppMariadb\process(), TplAppMemcached\process(), TplAppMysql\process(), TplAppNodejs\process(), TplAppPhp\process(), TplAppPostgresql\process(), and TplAppXlight\process().

+ Here is the caller graph for this function:

◆ getSectionContent()

static TplApp::getSectionContent ( $name,
$class,
$args = array() )
static

Generates the content of a section based on the provided name, class, and arguments.

Parameters
string$nameThe base name of the section.
string$classThe class name containing the method to generate the section content.
array$argsOptional arguments to pass to the method.
Returns
string The generated section content.

Definition at line 94 of file class.tpl.app.php.

95 {
96 $baseMethod = 'get' . ucfirst($name);
97 $args = $args == null ? array() : $args;
98 return '[' . self::getSectionName($name, $args) . ']' . PHP_EOL .
99 call_user_func_array($class . '::' . $baseMethod, $args);
100 }

References getSectionName().

◆ getSectionMenuLeft()

static TplApp::getSectionMenuLeft ( )
staticprivate

Generates the left menu section.

@global object $bearsamppRoot Provides access to the root directory of the application. @global object $bearsamppBins Provides access to system binaries and their configurations. @global object $bearsamppLang Provides language support for retrieving language-specific values.

Returns
string The generated left menu section.

Definition at line 319 of file class.tpl.app.php.

320 {
322
323 $tplNodejs = TplAppNodejs::process();
324 $tplApache = TplAppApache::process();
325 $tplPhp = TplAppPhp::process();
326 $tplMysql = TplAppMysql::process();
327 $tplMariadb = TplAppMariadb::process();
328 $tplPostgresql = TplAppPostgresql::process();
329 $tplMailhog = TplAppMailhog::process();
330 $tplMailpit = TplAppMailpit::process();
331 $tplMemcached = TplAppMemcached::process();
332 $tplFilezilla = TplAppFilezilla::process();
333 $tplXlight = TplAppXlight::process();
334
335 $tplLogs = TplAppLogs::process();
336 $tplApps = TplAppApps::process();
337 $tplTools = TplAppTools::process();
338
339 $tplServices = TplAppServices::process();
340
341 $tplOnline = TplAppOnline::process();
342
343 $httpUrl = 'http://localhost' . ($bearsamppBins->getApache()->getPort() != 80 ? ':' . $bearsamppBins->getApache()->getPort() : '');
344 $httpsUrl = 'https://localhost' . ($bearsamppBins->getApache()->getSslPort() != 443 ? ':' . $bearsamppBins->getApache()->getSslPort() : '');
345
346 return
347 // Items
348 '[Menu.Left]' . PHP_EOL .
349 TplAestan::getItemLink($bearsamppLang->getValue(Lang::MENU_LOCALHOST), $httpUrl) . PHP_EOL .
350 TplAestan::getItemLink($bearsamppLang->getValue(Lang::MENU_LOCALHOST) . ' (SSL)', $httpsUrl) . PHP_EOL .
352
353 //// Bins menus
354 TplAestan::getItemSeparator() . PHP_EOL .
355 $tplNodejs[self::SECTION_CALL] . PHP_EOL .
356 $tplApache[self::SECTION_CALL] . PHP_EOL .
357 $tplPhp[self::SECTION_CALL] . PHP_EOL .
358 $tplMysql[self::SECTION_CALL] . PHP_EOL .
359 $tplMariadb[self::SECTION_CALL] . PHP_EOL .
360 $tplPostgresql[self::SECTION_CALL] . PHP_EOL .
361 $tplMailhog[self::SECTION_CALL] . PHP_EOL .
362 $tplMailpit[self::SECTION_CALL] . PHP_EOL .
363 $tplMemcached[self::SECTION_CALL] . PHP_EOL .
364 $tplXlight[self::SECTION_CALL] . PHP_EOL .
365 $tplFilezilla[self::SECTION_CALL] . PHP_EOL .
366
367 //// Stuff menus
368 TplAestan::getItemSeparator() . PHP_EOL .
369 $tplLogs[self::SECTION_CALL] . PHP_EOL .
370 $tplTools[self::SECTION_CALL] . PHP_EOL .
371 $tplApps[self::SECTION_CALL] . PHP_EOL .
372
373 //// Services
374 TplAestan::getItemSeparator() . PHP_EOL .
375 $tplServices[self::SECTION_CALL] .
376
377 //// Put online/offline
378 TplAestan::getItemSeparator() . PHP_EOL .
379 $tplOnline[self::SECTION_CALL] . PHP_EOL .
380
381 // Actions
382 PHP_EOL . $tplNodejs[self::SECTION_CONTENT] .
383 PHP_EOL . $tplApache[self::SECTION_CONTENT] .
384 PHP_EOL . $tplPhp[self::SECTION_CONTENT] .
385 PHP_EOL . $tplMysql[self::SECTION_CONTENT] .
386 PHP_EOL . $tplMariadb[self::SECTION_CONTENT] .
387 PHP_EOL . $tplPostgresql[self::SECTION_CONTENT] .
388 PHP_EOL . $tplMailhog[self::SECTION_CONTENT] .
389 PHP_EOL . $tplMailpit[self::SECTION_CONTENT] .
390 PHP_EOL . $tplMemcached[self::SECTION_CONTENT] .
391 PHP_EOL . $tplFilezilla[self::SECTION_CONTENT] .
392 PHP_EOL . $tplXlight[self::SECTION_CONTENT] .
393 PHP_EOL . $tplLogs[self::SECTION_CONTENT] .
394 PHP_EOL . $tplTools[self::SECTION_CONTENT] .
395 PHP_EOL . $tplApps[self::SECTION_CONTENT] .
396 PHP_EOL . $tplServices[self::SECTION_CONTENT] .
397 PHP_EOL . $tplOnline[self::SECTION_CONTENT];
398 }
global $bearsamppBins
global $bearsamppLang
const MENU_LOCALHOST
const MENU_WWW_DIRECTORY
static getItemSeparator()
static getItemLink($caption, $link, $local=false, $glyph=self::GLYPH_WEB_PAGE)
static getItemExplore($caption, $path)
const SECTION_CALL
const SECTION_CONTENT

References $bearsamppBins, $bearsamppLang, $bearsamppRoot, TplAestan\getItemExplore(), TplAestan\getItemLink(), TplAestan\getItemSeparator(), Lang\MENU_LOCALHOST, Lang\MENU_WWW_DIRECTORY, TplAppApache\process(), TplAppApps\process(), TplAppFilezilla\process(), TplAppLogs\process(), TplAppMailhog\process(), TplAppMailpit\process(), TplAppMariadb\process(), TplAppMemcached\process(), TplAppMysql\process(), TplAppNodejs\process(), TplAppOnline\process(), TplAppPhp\process(), TplAppPostgresql\process(), TplAppServices\process(), TplAppTools\process(), TplAppXlight\process(), SECTION_CALL, and SECTION_CONTENT.

Referenced by process().

+ Here is the caller graph for this function:

◆ getSectionMenuRight()

static TplApp::getSectionMenuRight ( )
staticprivate

Generates the right menu section.

@global object $bearsamppLang Provides language support for retrieving language-specific values.

Returns
string The generated right menu section.

Definition at line 264 of file class.tpl.app.php.

265 {
266 global $bearsamppLang;
267
268 $tplReload = TplAppReload::process();
269 $tplBrowser = TplAppBrowser::process();
270 $tplLang = TplAppLang::process();
271 $tplLogsVerbose = TplAppLogsVerbose::process();
272 $tplLaunchStartup = TplAppLaunchStartup::process();
273 $tplExit = TplAppExit::process();
274
275 return
276 // Items
277 '[Menu.Right]' . PHP_EOL .
283 ) . PHP_EOL .
285
286 TplAestan::getItemSeparator() . PHP_EOL .
287 $tplReload[self::SECTION_CALL] . PHP_EOL .
288 TplAppClearFolders::process() . PHP_EOL .
289 TplAppRebuildIni::process() . PHP_EOL .
290 $tplBrowser[self::SECTION_CALL] . PHP_EOL .
291 TplAppEditConf::process() . PHP_EOL .
292
293 TplAestan::getItemSeparator() . PHP_EOL .
294 $tplLang[self::SECTION_CALL] . PHP_EOL .
295 $tplLogsVerbose[self::SECTION_CALL] . PHP_EOL .
296 $tplLaunchStartup[self::SECTION_CALL] . PHP_EOL .
297
298 TplAestan::getItemSeparator() . PHP_EOL .
299 $tplExit[self::SECTION_CALL] . PHP_EOL .
300
301 // Actions
302 PHP_EOL . $tplReload[self::SECTION_CONTENT] . PHP_EOL .
303 PHP_EOL . $tplBrowser[self::SECTION_CONTENT] . PHP_EOL .
304 PHP_EOL . $tplLang[self::SECTION_CONTENT] .
305 PHP_EOL . $tplLogsVerbose[self::SECTION_CONTENT] .
306 PHP_EOL . $tplLaunchStartup[self::SECTION_CONTENT] .
307 PHP_EOL . $tplExit[self::SECTION_CONTENT] . PHP_EOL;
308 }
const ABOUT
const CHECK_VERSION
const HELP
const MENU_CHECK_UPDATE
const MENU_ABOUT
static getWebsiteUrl($path='', $fragment='', $utmSource=true)

References $bearsamppLang, Action\ABOUT, Action\CHECK_VERSION, ActionCheckVersion\DISPLAY_OK, getActionRun(), TplAestan\getItemLink(), TplAestan\getItemSeparator(), Util\getWebsiteUrl(), TplAestan\GLYPH_ABOUT, TplAestan\GLYPH_UPDATE, Lang\HELP, Lang\MENU_ABOUT, Lang\MENU_CHECK_UPDATE, TplAppBrowser\process(), TplAppClearFolders\process(), TplAppEditConf\process(), TplAppExit\process(), TplAppLang\process(), TplAppLaunchStartup\process(), TplAppLogsVerbose\process(), TplAppRebuildIni\process(), TplAppReload\process(), SECTION_CALL, and SECTION_CONTENT.

Referenced by process().

+ Here is the caller graph for this function:

◆ getSectionName()

static TplApp::getSectionName ( $name,
$args = array() )
static

Generates a section name based on the provided name and arguments.

Parameters
string$nameThe base name of the section.
array$argsOptional arguments to include in the section name.
Returns
string The generated section name.

Definition at line 80 of file class.tpl.app.php.

81 {
82 return ucfirst($name) . (!empty($args) ? '-' . md5(serialize($args)) : '');
83 }

Referenced by getActionMulti(), getMenu(), getMenuEnable(), and getSectionContent().

+ Here is the caller graph for this function:

◆ getSectionServices()

static TplApp::getSectionServices ( )
staticprivate

Generates the services section.

@global object $bearsamppBins Provides access to system binaries and their configurations.

Returns
string The generated services section.

Definition at line 231 of file class.tpl.app.php.

232 {
233 global $bearsamppBins;
234
235 $result = '[Services]' . PHP_EOL;
236 foreach ($bearsamppBins->getServices() as $service) {
237 $result .= 'Name: ' . $service->getName() . PHP_EOL;
238 }
239
240 return $result;
241 }

References $bearsamppBins, and $result.

Referenced by process(), and processLight().

+ Here is the caller graph for this function:

◆ getSectionStartupAction()

static TplApp::getSectionStartupAction ( )
staticprivate

Generates the startup action section.

Returns
string The generated startup action section.

Definition at line 248 of file class.tpl.app.php.

249 {
250 return '[StartupAction]' . PHP_EOL .
254 self::getActionExec() . PHP_EOL;
255 }
const STARTUP
static getActionExec()

References Action\CHECK_VERSION, getActionExec(), TplAppReload\getActionReload(), getActionRun(), and Action\STARTUP.

Referenced by process(), and processLight().

+ Here is the caller graph for this function:

◆ process()

static TplApp::process ( )
static

Processes and generates the main sections of the application.

This method generates the main sections of the application, including configuration, services, messages, startup actions, and menu settings.

@global object $bearsamppCore Provides access to core functionalities and configurations.

Returns
string The generated sections as a concatenated string.

Definition at line 43 of file class.tpl.app.php.

44 {
45 global $bearsamppCore;
46
47 return TplAestan::getSectionConfig() . PHP_EOL .
48 self::getSectionServices() . PHP_EOL .
52 TplAestan::getSectionMenuLeftSettings(APP_TITLE . ' ' . $bearsamppCore->getAppVersion()) . PHP_EOL .
53 self::getSectionMenuRight() . PHP_EOL .
54 self::getSectionMenuLeft() . PHP_EOL;
55 }
static getSectionMessages()
static getSectionMenuLeftSettings($caption)
static getSectionConfig()
static getSectionMenuRightSettings()
static getSectionServices()
static getSectionMenuLeft()
static getSectionMenuRight()
static getSectionStartupAction()
const APP_TITLE
Definition root.php:12

References $bearsamppCore, APP_TITLE, TplAestan\getSectionConfig(), getSectionMenuLeft(), TplAestan\getSectionMenuLeftSettings(), getSectionMenuRight(), TplAestan\getSectionMenuRightSettings(), TplAestan\getSectionMessages(), getSectionServices(), and getSectionStartupAction().

Referenced by ActionReload\__construct().

+ Here is the caller graph for this function:

◆ processLight()

static TplApp::processLight ( )
static

Processes and generates a lighter version of the main sections.

This method generates a lighter version of the main sections, excluding some menu settings.

Returns
string The generated sections as a concatenated string.

Definition at line 64 of file class.tpl.app.php.

65 {
66 return TplAestan::getSectionConfig() . PHP_EOL .
67 self::getSectionServices() . PHP_EOL .
70 }

References TplAestan\getSectionConfig(), TplAestan\getSectionMessages(), getSectionServices(), and getSectionStartupAction().

Field Documentation

◆ ITEM_CAPTION

const TplApp::ITEM_CAPTION = 0

Definition at line 20 of file class.tpl.app.php.

Referenced by getActionMulti(), and getActionRun().

◆ ITEM_GLYPH

const TplApp::ITEM_GLYPH = 1

Definition at line 21 of file class.tpl.app.php.

Referenced by getActionMulti(), and getActionRun().

◆ SECTION_CALL

const TplApp::SECTION_CALL = 0

Definition at line 23 of file class.tpl.app.php.

Referenced by TplAppApache\getMenuApache(), TplAppApache\getMenuApacheAlias(), TplAppApache\getMenuApacheModules(), TplAppApache\getMenuApacheService(), TplAppApache\getMenuApacheVersions(), TplAppApache\getMenuApacheVhosts(), TplAppFilezilla\getMenuFilezilla(), TplAppFilezilla\getMenuFilezillaService(), TplAppFilezilla\getMenuFilezillaVersions(), TplAppGit\getMenuGit(), TplAppLang\getMenuLang(), TplAppLogsVerbose\getMenuLogsVerbose(), TplAppMailhog\getMenuMailhog(), TplAppMailhog\getMenuMailhogService(), TplAppMailhog\getMenuMailhogVersions(), TplAppMailpit\getMenuMailpit(), TplAppMailpit\getMenuMailpitService(), TplAppMailpit\getMenuMailpitVersions(), TplAppMariadb\getMenuMariadb(), TplAppMariadb\getMenuMariadbService(), TplAppMariadb\getMenuMariadbVersions(), TplAppMemcached\getMenuMemcached(), TplAppMemcached\getMenuMemcachedService(), TplAppMemcached\getMenuMemcachedVersions(), TplAppMysql\getMenuMysql(), TplAppMysql\getMenuMysqlService(), TplAppMysql\getMenuMysqlVersions(), TplAppNodejs\getMenuNodejs(), TplAppNodejs\getMenuNodejsVersions(), TplAppPhp\getMenuPhp(), TplAppPhp\getMenuPhpExtensions(), TplAppPhp\getMenuPhpSettings(), TplAppPhp\getMenuPhpVersions(), TplAppPostgresql\getMenuPostgresql(), TplAppPostgresql\getMenuPostgresqlService(), TplAppPostgresql\getMenuPostgresqlVersions(), TplAppTools\getMenuTools(), TplAppXlight\getMenuXlight(), TplAppXlight\getMenuXlightService(), TplAppXlight\getMenuXlightVersions(), getSectionMenuLeft(), getSectionMenuRight(), TplAppPhp\getSubmenuPhpSettings(), and TplAppServices\process().

◆ SECTION_CONTENT

const TplApp::SECTION_CONTENT = 1

Definition at line 24 of file class.tpl.app.php.

Referenced by TplAppApache\getMenuApache(), TplAppApache\getMenuApacheAlias(), TplAppApache\getMenuApacheModules(), TplAppApache\getMenuApacheService(), TplAppApache\getMenuApacheVersions(), TplAppApache\getMenuApacheVhosts(), TplAppFilezilla\getMenuFilezilla(), TplAppFilezilla\getMenuFilezillaService(), TplAppFilezilla\getMenuFilezillaVersions(), TplAppGit\getMenuGit(), TplAppLang\getMenuLang(), TplAppLogsVerbose\getMenuLogsVerbose(), TplAppMailhog\getMenuMailhog(), TplAppMailhog\getMenuMailhogService(), TplAppMailhog\getMenuMailhogVersions(), TplAppMailpit\getMenuMailpit(), TplAppMailpit\getMenuMailpitService(), TplAppMailpit\getMenuMailpitVersions(), TplAppMariadb\getMenuMariadb(), TplAppMariadb\getMenuMariadbService(), TplAppMariadb\getMenuMariadbVersions(), TplAppMemcached\getMenuMemcached(), TplAppMemcached\getMenuMemcachedService(), TplAppMemcached\getMenuMemcachedVersions(), TplAppMysql\getMenuMysql(), TplAppMysql\getMenuMysqlService(), TplAppMysql\getMenuMysqlVersions(), TplAppNodejs\getMenuNodejs(), TplAppNodejs\getMenuNodejsVersions(), TplAppPhp\getMenuPhp(), TplAppPhp\getMenuPhpExtensions(), TplAppPhp\getMenuPhpSettings(), TplAppPhp\getMenuPhpVersions(), TplAppPostgresql\getMenuPostgresql(), TplAppPostgresql\getMenuPostgresqlService(), TplAppPostgresql\getMenuPostgresqlVersions(), TplAppTools\getMenuTools(), TplAppXlight\getMenuXlight(), TplAppXlight\getMenuXlightService(), TplAppXlight\getMenuXlightVersions(), getSectionMenuLeft(), getSectionMenuRight(), TplAppPhp\getSubmenuPhpSettings(), and TplAppServices\process().


The documentation for this class was generated from the following file: