Bearsampp 2026.7.11
Loading...
Searching...
No Matches
Path Class Reference

Static Public Member Functions

static aetrayPath ($path)
static changePath ($filesToScan, $rootPath=null)
static clearPathFormatCache ()
static formatUnixPath ($path)
static formatWindowsPath ($path)
static getAjaxPath ($aetrayPath=false)
static getAliasPath ($aetrayPath=false)
static getAppsPath ($aetrayPath=false)
static getBatchLogFilePath ($aetrayPath=false)
static getBinPath ($aetrayPath=false)
static getConfigFilePath ($aetrayPath=false)
static getCorePath ($aetrayPath=false)
static getErrorLogFilePath ($aetrayPath=false)
static getExeFilePath ($aetrayPath=false)
static getHomepageFilePath ($aetrayPath=false)
static getHomepageLogFilePath ($aetrayPath=false)
static getHomepagePath ($aetrayPath=false)
static getHostsEditorExe ($aetrayPath=false)
static getHostsEditorPath ($aetrayPath=false)
static getIconsPath ($aetrayPath=false)
static getImagesPath ($aetrayPath=false)
static getIniFilePath ($aetrayPath=false)
static getisRootFilePath ($aetrayPath=false)
static getLangsPath ($aetrayPath=false)
static getLastPath ($aetrayPath=false)
static getLibsPath ($aetrayPath=false)
static getLnExe ($aetrayPath=false)
static getLnPath ($aetrayPath=false)
static getLocalUrl ($request=null)
static getLogFilePath ($aetrayPath=false)
static getLogsPath ($aetrayPath=false)
static getMkcertExe ($aetrayPath=false)
static getMkcertPath ($aetrayPath=false)
static getMkcertRootCaName ()
static getModuleCurrentPath ($module)
static getModuleRootPath ($module)
static getModuleSymlinkPath ($module)
static getNssmEnvPaths ()
static getNssmExe ($aetrayPath=false)
static getNssmLogFilePath ($aetrayPath=false)
static getNssmPath ($aetrayPath=false)
static getOpenSslConf ($aetrayPath=false)
static getOpenSslExe ($aetrayPath=false)
static getOpenSslPath ($aetrayPath=false)
static getPathFormatCacheSize ()
static getPathFormatStats ()
static getPhpExe ($aetrayPath=false)
static getPhpPath ($aetrayPath=false)
static getPowerShellPath ()
static getProcessName ()
static getPwgenExe ($aetrayPath=false)
static getPwgenPath ($aetrayPath=false)
static getRegistryLogFilePath ($aetrayPath=false)
static getResourcesPath ($aetrayPath=false)
static getRootPath ($aetrayPath=false)
static getScript ($type)
static getScriptsPath ($aetrayPath=false)
static getServicesLogFilePath ($aetrayPath=false)
static getSetEnvExe ($aetrayPath=false)
static getSetEnvPath ($aetrayPath=false)
static getSslConfPath ($aetrayPath=false)
static getSslPath ($aetrayPath=false)
static getStartupLnkPath ()
static getStartupLogFilePath ($aetrayPath=false)
static getTmpPath ($aetrayPath=false)
static getToolsPath ($aetrayPath=false)
static getVhostsPath ($aetrayPath=false)
static getWebIconsPath ()
static getWebImagesPath ()
static getWebResourcesPath ()
static getWebResourcesUrl ()
static getWinbinderLogFilePath ($aetrayPath=false)
static getWwwPath ($aetrayPath=false)
static init ($rootPath, $corePath)

Static Private Attributes

static $corePath
static $pathFormatCache = []
static $pathFormatCacheMaxSize = 500
static $pathFormatStats
static $rootPath

Detailed Description

Path formatting utilities with a write-through cache.

Converts between Windows (backslash) and Unix (forward-slash) path styles and caches the results to avoid redundant string replacements for frequently used paths such as root, bin, and tool paths.

Usage:

$win = Path::formatWindowsPath('/some/unix/path');
$unix = Path::formatUnixPath('C:\some\windows\path');
static formatWindowsPath($path)
static formatUnixPath($path)

Definition at line 24 of file class.path.php.

Member Function Documentation

◆ aetrayPath()

aetrayPath ( $path)
static

Formats a path for AeTrayMenu.

Parameters
string$pathThe path to format.
Returns
string The formatted path.

Definition at line 295 of file class.path.php.

296 {
298 $path = str_replace($rootPath, '', $path);
299 $path = ltrim(self::formatUnixPath($path), '/');
300 return '%AeTrayMenuPath%' . $path;
301 }
static $rootPath
static getRootPath($aetrayPath=false)

References $rootPath, and getRootPath().

Referenced by getCorePath(), and getRootPath().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ changePath()

changePath ( $filesToScan,
$rootPath = null )
static

Replaces old path references with new path references in the specified files.

Parameters
array$filesToScanArray of file paths to scan and modify.
string | null$rootPathThe new root path to replace the old one. If null, uses a default root path.
Returns
array Returns an array with the count of occurrences changed and the count of files changed.

Definition at line 201 of file class.path.php.

202 {
204
205 $result = array(
206 'countChangedOcc' => 0,
207 'countChangedFiles' => 0
208 );
209
211 $unixOldPath = Path::formatUnixPath($bearsamppCore->getLastPathContent());
212 $windowsOldPath = Path::formatWindowsPath($bearsamppCore->getLastPathContent());
213 $unixCurrentPath = Path::formatUnixPath($rootPath);
214 $windowsCurrentPath = Path::formatWindowsPath($rootPath);
215
216 foreach ($filesToScan as $fileToScan) {
217 $tmpCountChangedOcc = 0;
218 $fileContentOr = file_get_contents($fileToScan);
219
220 if ($fileContentOr === false) {
221 Log::error("changePath(): Failed to read file: " . $fileToScan);
222 continue;
223 }
224
225 $fileContent = $fileContentOr;
226
227 // old path
228 if (stripos($fileContent, $unixOldPath) !== false) {
229 $fileContent = str_ireplace($unixOldPath, $unixCurrentPath, $fileContent, $countChanged);
230 $tmpCountChangedOcc += $countChanged;
231 }
232 if (stripos($fileContent, $windowsOldPath) !== false) {
233 $fileContent = str_ireplace($windowsOldPath, $windowsCurrentPath, $fileContent, $countChanged);
234 $tmpCountChangedOcc += $countChanged;
235 }
236
237 // placeholders
238 if (strpos($fileContent, Core::PATH_LIN_PLACEHOLDER) !== false) {
239 $fileContent = str_replace(Core::PATH_LIN_PLACEHOLDER, $unixCurrentPath, $fileContent, $countChanged);
240 $tmpCountChangedOcc += $countChanged;
241 }
242 if (strpos($fileContent, Core::PATH_WIN_PLACEHOLDER) !== false) {
243 $fileContent = str_replace(Core::PATH_WIN_PLACEHOLDER, $windowsCurrentPath, $fileContent, $countChanged);
244 $tmpCountChangedOcc += $countChanged;
245 }
246
247 if ($fileContentOr != $fileContent) {
248 if (file_put_contents($fileToScan, $fileContent) !== false) {
249 $result['countChangedOcc'] += $tmpCountChangedOcc;
250 $result['countChangedFiles'] += 1;
251 } else {
252 Log::error("changePath(): Failed to write to file: " . $fileToScan);
253 }
254 }
255 }
256
257 Log::debug('changePath() completed: ' . $result['countChangedFiles'] . ' files changed, ' . $result['countChangedOcc'] . ' total occurrences');
258
259 return $result;
260 }
$result
global $bearsamppRoot
global $bearsamppCore
const PATH_LIN_PLACEHOLDER
const PATH_WIN_PLACEHOLDER
static debug($data, $file=null)
static error($data, $file=null)

References $bearsamppCore, $bearsamppRoot, $result, $rootPath, Log\debug(), Log\error(), formatUnixPath(), formatWindowsPath(), getRootPath(), Core\PATH_LIN_PLACEHOLDER, and Core\PATH_WIN_PLACEHOLDER.

Referenced by ActionStartup\changePath(), BinPostgresql\initData(), and ActionSwitchVersion\processWindow().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ clearPathFormatCache()

clearPathFormatCache ( )
static

Clears the path format cache. Useful when paths change or for testing purposes.

Returns
void

Definition at line 268 of file class.path.php.

269 {
270 self::$pathFormatCache = [];
271 self::$pathFormatStats = [
272 'unix_hits' => 0,
273 'unix_misses' => 0,
274 'windows_hits' => 0,
275 'windows_misses' => 0,
276 ];
277 }

◆ formatUnixPath()

formatUnixPath ( $path)
static

Converts a Windows-style path to a Unix-style path with caching. Unix-style paths use forward slashes (/) as separators.

Performance optimization: Caches results to avoid redundant string replacements for frequently used paths (e.g., root paths, bin paths).

Parameters
string$pathThe Windows-style path to convert.
Returns
string Returns the converted Unix-style path.

Definition at line 156 of file class.path.php.

157 {
158 if (empty($path)) {
159 return $path;
160 }
161
162 $cacheKey = 'u_' . $path;
163 if (isset(self::$pathFormatCache[$cacheKey])) {
164 self::$pathFormatStats['unix_hits']++;
165 return self::$pathFormatCache[$cacheKey];
166 }
167
168 self::$pathFormatStats['unix_misses']++;
169
170 $result = str_replace('\\', '/', $path);
171
172 if (count(self::$pathFormatCache) < self::$pathFormatCacheMaxSize) {
173 self::$pathFormatCache[$cacheKey] = $result;
174 } else {
175 $removeCount = (int)(self::$pathFormatCacheMaxSize * 0.1);
176 self::$pathFormatCache = array_slice(self::$pathFormatCache, $removeCount, null, true);
177 self::$pathFormatCache[$cacheKey] = $result;
178 }
179
180 return $result;
181 }

References $result.

Referenced by changePath(), ActionQuit\checkForOrphanedProcesses(), OpenSsl\delSslCertificateHandler(), Root\errorHandler(), Win32Ps\findByPath(), Util\findFile(), Util\findFiles(), Util\findRepos(), OpenSsl\genSslCertificateHandler(), BinApache\getAliasContent(), BinApache\getVhostContent(), Win32Ps\killBins(), ActionStartup\killOldInstances(), ActionGenSslCertificate\processWindow(), ActionStartup\processWindow(), and ToolGit\reload().

Here is the caller graph for this function:

◆ formatWindowsPath()

formatWindowsPath ( $path)
static

Converts a Unix-style path to a Windows-style path with caching. This is a Windows application, so paths use backslashes () as separators.

Performance optimization: Caches results to avoid redundant string replacements for frequently used paths (e.g., root paths, bin paths).

Parameters
string$pathThe Unix-style path to convert.
Returns
string Returns the converted Windows-style path.

Definition at line 118 of file class.path.php.

119 {
120 if (empty($path)) {
121 return $path;
122 }
123
124 $cacheKey = 'w_' . $path;
125 if (isset(self::$pathFormatCache[$cacheKey])) {
126 self::$pathFormatStats['windows_hits']++;
127 return self::$pathFormatCache[$cacheKey];
128 }
129
130 self::$pathFormatStats['windows_misses']++;
131
132 $result = str_replace('/', '\\', $path);
133
134 if (count(self::$pathFormatCache) < self::$pathFormatCacheMaxSize) {
135 self::$pathFormatCache[$cacheKey] = $result;
136 } else {
137 $removeCount = (int)(self::$pathFormatCacheMaxSize * 0.1);
138 self::$pathFormatCache = array_slice(self::$pathFormatCache, $removeCount, null, true);
139 self::$pathFormatCache[$cacheKey] = $result;
140 }
141
142 return $result;
143 }

References $result.

Referenced by ActionGenSslCertificate\__construct(), changePath(), ActionStartup\checkPathRegKey(), OpenSsl\createCrt(), ActionAddVhost\createFormFields(), ActionEditAlias\createFormFields(), ActionEditVhost\createFormFields(), Symlinks\createModuleSymlink(), Batch\createSymlink(), OpenSsl\delSslCertificate(), OpenSsl\ensureRootCaExists(), OpenSsl\genSslCertificate(), Registry\getAppBinsRegKey(), TplAestan\getItemPowerShell(), getNssmEnvPaths(), ToolPowerShell\getShell(), Batch\getTmpFile(), BinMariadb\initData(), Batch\installPostgresqlService(), OpenSsl\makeRootCa(), Batch\refreshEnvVars(), BinMariadb\reload(), Batch\removeSymlink(), Nssm\setBinPath(), Win32Service\setBinPath(), Nssm\setEnvironmentExtra(), and Batch\uninstallPostgresqlService().

Here is the caller graph for this function:

◆ getAjaxPath()

getAjaxPath ( $aetrayPath = false)
static

Retrieves the path to the ajax directory.

Parameters
bool$aetrayPathWhether to format the path for AeTrayMenu.
Returns
string The path to the ajax directory.

Definition at line 320 of file class.path.php.

321 {
322 return self::getHomepagePath($aetrayPath) . '/ajax';
323 }
static getHomepagePath($aetrayPath=false)

References getHomepagePath().

Here is the call graph for this function:

◆ getAliasPath()

getAliasPath ( $aetrayPath = false)
static

Gets the path to the alias directory.

Parameters
bool$aetrayPathWhether to format the path for AeTrayMenu.
Returns
string The alias path.

Definition at line 331 of file class.path.php.

332 {
333 return self::getRootPath($aetrayPath) . '/alias';
334 }

References getRootPath().

Referenced by ActionEditAlias\createFormFields(), ActionEditAlias\deleteItem(), BinApache\getAlias(), ActionEditAlias\getDeleteErrorMessage(), Util\getPathsToScan(), ActionEditAlias\initializeDialog(), ActionAddAlias\itemExists(), ActionEditAlias\itemExists(), BinApache\refreshAlias(), ActionAddAlias\saveItem(), ActionEditAlias\saveItem(), AppPhpmyadmin\updateConfig(), and AppPhppgadmin\updateConfig().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getAppsPath()

getAppsPath ( $aetrayPath = false)
static

Gets the path to the apps directory.

Parameters
bool$aetrayPathWhether to format the path for AeTrayMenu.
Returns
string The apps path.

Definition at line 342 of file class.path.php.

343 {
344 return self::getRootPath($aetrayPath) . '/apps';
345 }

References getRootPath().

Referenced by Symlinks\deleteCurrentSymlinks(), QuickPick\getModuleDestinationPath(), Symlinks\isPathWithinAllowedBase(), and Module\reload().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getBatchLogFilePath()

getBatchLogFilePath ( $aetrayPath = false)
static

Gets the path to the batch log file.

Parameters
bool$aetrayPathWhether to format the path for AeTrayMenu.
Returns
string The batch log file path.

Definition at line 353 of file class.path.php.

354 {
355 return self::getLogsPath($aetrayPath) . '/bearsampp-batch.log';
356 }
static getLogsPath($aetrayPath=false)

References getLogsPath().

Referenced by Log\separator(), Batch\writeLog(), and CommandRunner\writeLog().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getBinPath()

getBinPath ( $aetrayPath = false)
static

Gets the path to the bin directory.

Parameters
bool$aetrayPathWhether to format the path for AeTrayMenu.
Returns
string The bin path.

Definition at line 364 of file class.path.php.

365 {
366 return self::getRootPath($aetrayPath) . '/bin';
367 }

References getRootPath().

Referenced by Symlinks\deleteCurrentSymlinks(), QuickPick\getModuleDestinationPath(), Symlinks\isPathWithinAllowedBase(), and Module\reload().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getConfigFilePath()

getConfigFilePath ( $aetrayPath = false)
static

Gets the path to the configuration file.

Parameters
bool$aetrayPathWhether to format the path for AeTrayMenu.
Returns
string The configuration file path.

Definition at line 375 of file class.path.php.

376 {
377 return self::getRootPath($aetrayPath) . '/bearsampp.conf';
378 }

References getRootPath().

Referenced by Config\__construct(), TplAppEditConf\process(), and Config\replaceAll().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getCorePath()

getCorePath ( $aetrayPath = false)
static

Retrieves the core path of the application.

Parameters
bool$aetrayPathWhether to format the path for AeTrayMenu.
Returns
string The core path.

Definition at line 386 of file class.path.php.

387 {
388 return $aetrayPath ? self::aetrayPath(self::$corePath) : self::$corePath;
389 }
static aetrayPath($path)
static $corePath

References aetrayPath().

Referenced by TplApp\getActionRun(), getisRootFilePath(), getLangsPath(), getLibsPath(), getResourcesPath(), getScriptsPath(), getTmpPath(), and Autoloader\load().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getErrorLogFilePath()

getErrorLogFilePath ( $aetrayPath = false)
static

Gets the path to the error log file.

Parameters
bool$aetrayPathWhether to format the path for AeTrayMenu.
Returns
string The error log file path.

Definition at line 439 of file class.path.php.

440 {
441 return self::getLogsPath($aetrayPath) . '/bearsampp-error.log';
442 }

References getLogsPath().

Referenced by Root\errorHandler(), LangProc\getValue(), Root\initErrorHandling(), Log\separator(), and Log\write().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getExeFilePath()

getExeFilePath ( $aetrayPath = false)
static

Gets the path to the executable file.

Parameters
bool$aetrayPathWhether to format the path for AeTrayMenu.
Returns
string The executable file path.

Definition at line 450 of file class.path.php.

451 {
452 return self::getRootPath($aetrayPath) . '/bearsampp.exe';
453 }

References getRootPath().

Referenced by Util\enableLaunchStartup(), Batch\exitApp(), Win32Ps\killBins(), ActionExt\procReload(), and ActionExt\procStart().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getHomepageFilePath()

getHomepageFilePath ( $aetrayPath = false)
static

Gets the path to the homepage file.

Parameters
bool$aetrayPathWhether to format the path for AeTrayMenu.
Returns
string The homepage file path.

Definition at line 461 of file class.path.php.

462 {
463 return self::getWwwPath($aetrayPath) . '/index.php';
464 }
static getWwwPath($aetrayPath=false)

References getWwwPath().

Here is the call graph for this function:

◆ getHomepageLogFilePath()

getHomepageLogFilePath ( $aetrayPath = false)
static

Gets the path to the homepage log file.

Parameters
bool$aetrayPathWhether to format the path for AeTrayMenu.
Returns
string The homepage log file path.

Definition at line 472 of file class.path.php.

473 {
474 return self::getLogsPath($aetrayPath) . '/bearsampp-homepage.log';
475 }

References getLogsPath().

Referenced by Log\write().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getHomepagePath()

getHomepagePath ( $aetrayPath = false)
static

Retrieves the path to the homepage.

Parameters
bool$aetrayPathWhether to format the path for AeTrayMenu.
Returns
string The path to the homepage.

Definition at line 483 of file class.path.php.

484 {
485 return self::getResourcesPath($aetrayPath) . '/homepage';
486 }
static getResourcesPath($aetrayPath=false)

References getResourcesPath().

Referenced by getAjaxPath(), getImagesPath(), and Homepage\refreshAliasContent().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getHostsEditorExe()

getHostsEditorExe ( $aetrayPath = false)
static

Retrieves the path to the HostsEditor executable.

Parameters
bool$aetrayPathWhether to format the path for AeTrayMenu.
Returns
string The path to the HostsEditor executable.

Definition at line 505 of file class.path.php.

506 {
507 return self::getHostsEditorPath($aetrayPath) . '/' . Core::HOSTSEDITOR_EXE;
508 }
const HOSTSEDITOR_EXE
static getHostsEditorPath($aetrayPath=false)

References getHostsEditorPath(), and Core\HOSTSEDITOR_EXE.

Referenced by TplAppTools\getMenuTools().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getHostsEditorPath()

getHostsEditorPath ( $aetrayPath = false)
static

Retrieves the path to the HostsEditor directory.

Parameters
bool$aetrayPathWhether to format the path for AeTrayMenu.
Returns
string The path to the HostsEditor directory.

Definition at line 494 of file class.path.php.

495 {
496 return self::getLibsPath($aetrayPath) . '/hostseditor';
497 }
static getLibsPath($aetrayPath=false)

References getLibsPath().

Referenced by getHostsEditorExe().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getIconsPath()

getIconsPath ( $aetrayPath = false)
static

Retrieves the path to the icons.

Parameters
bool$aetrayPathWhether to format the path for AeTrayMenu.
Returns
string The path to the icons.

Definition at line 516 of file class.path.php.

517 {
518 return self::getImagesPath($aetrayPath) . '/icons';
519 }
static getImagesPath($aetrayPath=false)

References getImagesPath().

Referenced by Util\enableLaunchStartup().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getImagesPath()

getImagesPath ( $aetrayPath = false)
static

Retrieves the path to the images.

Parameters
bool$aetrayPathWhether to format the path for AeTrayMenu.
Returns
string The path to the images.

Definition at line 527 of file class.path.php.

528 {
529 return self::getHomepagePath($aetrayPath) . '/img';
530 }

References getHomepagePath().

Referenced by ActionAbout\__construct(), ActionLoading\__construct(), WinBinder\createWindow(), getIconsPath(), ActionLoading\incrProgressBar(), Splash\incrProgressBar(), Splash\init(), and ActionCheckVersion\showVersionUpdateWindow().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getIniFilePath()

getIniFilePath ( $aetrayPath = false)
static

Gets the path to the INI file.

Parameters
bool$aetrayPathWhether to format the path for AeTrayMenu.
Returns
string The INI file path.

Definition at line 538 of file class.path.php.

539 {
540 return self::getRootPath($aetrayPath) . '/bearsampp.ini';
541 }

References getRootPath().

Referenced by ActionRebuildini\__construct(), and ActionReload\__construct().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getisRootFilePath()

getisRootFilePath ( $aetrayPath = false)
static

Retrieves the path to the root file.

Parameters
bool$aetrayPathWhether to format the path for AeTrayMenu.
Returns
string The path to the root file.

Definition at line 549 of file class.path.php.

550 {
551 return self::getCorePath($aetrayPath) . '/' . Core::isRoot_FILE;
552 }
const isRoot_FILE
static getCorePath($aetrayPath=false)

References getCorePath(), and Core\isRoot_FILE.

Here is the call graph for this function:

◆ getLangsPath()

getLangsPath ( $aetrayPath = false)
static

Retrieves the path to the language files.

Parameters
bool$aetrayPathWhether to format the path for AeTrayMenu.
Returns
string The path to the language files.

Definition at line 560 of file class.path.php.

561 {
562 return self::getCorePath($aetrayPath) . '/langs';
563 }

References getCorePath().

Referenced by LangProc\getList(), and LangProc\load().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getLastPath()

getLastPath ( $aetrayPath = false)
static

Retrieves the path to the last path file.

Parameters
bool$aetrayPathWhether to format the path for AeTrayMenu.
Returns
string The path to the last path file.

Definition at line 571 of file class.path.php.

572 {
573 return self::getResourcesPath($aetrayPath) . '/' . Core::LAST_PATH;
574 }
const LAST_PATH

References getResourcesPath(), and Core\LAST_PATH.

Referenced by Core\getLastPathContent(), and ActionStartup\savePath().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getLibsPath()

getLibsPath ( $aetrayPath = false)
static

Retrieves the path to the libraries.

Parameters
bool$aetrayPathWhether to format the path for AeTrayMenu.
Returns
string The path to the libraries.

Definition at line 582 of file class.path.php.

583 {
584 return self::getCorePath($aetrayPath) . '/libs';
585 }

References getCorePath().

Referenced by Core\__construct(), getHostsEditorPath(), getLnPath(), getMkcertPath(), getNssmPath(), getOpenSslPath(), getPhpPath(), getPwgenPath(), getSetEnvPath(), and Core\unzipFile().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getLnExe()

getLnExe ( $aetrayPath = false)
static

Retrieves the path to the LN executable.

Parameters
bool$aetrayPathWhether to format the path for AeTrayMenu.
Returns
string The path to the LN executable.

Definition at line 604 of file class.path.php.

605 {
606 return self::getLnPath($aetrayPath) . '/' . Core::LN_EXE;
607 }
const LN_EXE
static getLnPath($aetrayPath=false)

References getLnPath(), and Core\LN_EXE.

Referenced by Batch\createSymlink().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getLnPath()

getLnPath ( $aetrayPath = false)
static

Retrieves the path to the LN directory.

Parameters
bool$aetrayPathWhether to format the path for AeTrayMenu.
Returns
string The path to the LN directory.

Definition at line 593 of file class.path.php.

594 {
595 return self::getLibsPath($aetrayPath) . '/ln';
596 }

References getLibsPath().

Referenced by getLnExe().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getLocalUrl()

getLocalUrl ( $request = null)
static

Constructs a local URL with the specified request.

Parameters
string | null$requestThe specific request to append to the URL.
Returns
string The constructed local URL.

Definition at line 407 of file class.path.php.

408 {
409 global $bearsamppBins;
410 $isHttps = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off');
411 $scheme = $isHttps ? 'https://' : 'http://';
412 $host = (isset($_SERVER['SERVER_NAME'])) ? $_SERVER['SERVER_NAME'] : 'localhost';
413
414 $port = 80;
415 if (isset($bearsamppBins) && $bearsamppBins->getApache() !== null) {
416 $port = $isHttps ? $bearsamppBins->getApache()->getSslPort() : $bearsamppBins->getApache()->getPort();
417 }
418
419 $portSuffix = '';
420 if ($isHttps) {
421 if ($port != 443) {
422 $portSuffix = ':' . $port;
423 }
424 } else {
425 if ($port != 80) {
426 $portSuffix = ':' . $port;
427 }
428 }
429
430 return $scheme . $host . $portSuffix . (!empty($request) ? '/' . $request : '');
431 }
global $bearsamppBins
$port

References $bearsamppBins, and $port.

Referenced by TplAestan\getItemLink(), TplAppMailpit\getMenuMailpit(), and Homepage\getPageUrl().

Here is the caller graph for this function:

◆ getLogFilePath()

getLogFilePath ( $aetrayPath = false)
static

Gets the path to the log file.

Parameters
bool$aetrayPathWhether to format the path for AeTrayMenu.
Returns
string The log file path.

Definition at line 615 of file class.path.php.

616 {
617 return self::getLogsPath($aetrayPath) . '/bearsampp.log';
618 }

References getLogsPath().

Referenced by Log\separator(), and Log\write().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getLogsPath()

getLogsPath ( $aetrayPath = false)
static

Gets the path to the logs directory.

Parameters
bool$aetrayPathWhether to format the path for AeTrayMenu.
Returns
string The logs path.

Definition at line 626 of file class.path.php.

627 {
628 return self::getRootPath($aetrayPath) . '/logs';
629 }

References getRootPath().

Referenced by ActionClearFolders\__construct(), getBatchLogFilePath(), getErrorLogFilePath(), getHomepageLogFilePath(), getLogFilePath(), TplAppLogs\getMenuLogs(), getNssmLogFilePath(), getRegistryLogFilePath(), getServicesLogFilePath(), getStartupLogFilePath(), BinApache\getVhostContent(), getWinbinderLogFilePath(), BinApache\reload(), BinMailpit\reload(), BinMariadb\reload(), BinMemcached\reload(), BinMysql\reload(), BinPhp\reload(), BinPostgresql\reload(), BinXlight\reload(), and ActionStartup\rotationLogs().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getMkcertExe()

getMkcertExe ( $aetrayPath = false)
static

Gets the path to the mkcert executable.

Parameters
bool$aetrayPathWhether to format the path for AeTrayMenu.
Returns
string The mkcert executable path.

Definition at line 973 of file class.path.php.

974 {
975 return self::getMkcertPath($aetrayPath) . '/mkcert.exe';
976 }
static getMkcertPath($aetrayPath=false)

References getMkcertPath().

Referenced by OpenSsl\createCrt(), OpenSsl\ensureMkcertExeExists(), OpenSsl\ensureRootCaExists(), and OpenSsl\makeRootCa().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getMkcertPath()

getMkcertPath ( $aetrayPath = false)
static

Gets the path to the mkcert directory.

Parameters
bool$aetrayPathWhether to format the path for AeTrayMenu.
Returns
string The mkcert path.

Definition at line 962 of file class.path.php.

963 {
964 return self::getLibsPath($aetrayPath) . '/mkcert';
965 }

References getLibsPath().

Referenced by getMkcertExe().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getMkcertRootCaName()

getMkcertRootCaName ( )
static

Gets the name of the mkcert root CA file.

Returns
string The mkcert root CA filename.

Definition at line 983 of file class.path.php.

984 {
985 return 'rootCA.pem';
986 }

Referenced by OpenSsl\ensureRootCaExists(), and OpenSsl\makeRootCa().

Here is the caller graph for this function:

◆ getModuleCurrentPath()

getModuleCurrentPath ( $module)
static

Retrieves the current path for a module.

Parameters
Module$moduleThe module instance.
Returns
string The module current path.

Definition at line 43 of file class.path.php.

44 {
45 return $module->currentPath;
46 }

Referenced by BinPhp\getApacheModule(), BinPhp\getExtensionsFromFolder(), BinPhp\getPearVersion(), BinPhp\getTsDll(), BinMariadb\initData(), BinMysql\initData(), BinPostgresql\initData(), BinPhp\reload(), BinMysql\updateConfig(), and BinPostgresql\updateConfig().

Here is the caller graph for this function:

◆ getModuleRootPath()

getModuleRootPath ( $module)
static

Retrieves the root path for a module.

Parameters
Module$moduleThe module instance.
Returns
string The module root path.

Definition at line 32 of file class.path.php.

33 {
34 return $module->rootPath;
35 }

Referenced by ActionSwitchVersion\__construct(), and Util\getPathsToScan().

Here is the caller graph for this function:

◆ getModuleSymlinkPath()

◆ getNssmEnvPaths()

getNssmEnvPaths ( )
static

Gets the NSSM environment paths.

Returns
string The NSSM environment paths string.

Definition at line 658 of file class.path.php.

659 {
660 global $bearsamppBins, $bearsamppTools;
661
662 $paths = '';
663
664 // Add paths for enabled bins
665 if (isset($bearsamppBins)) {
666 if ($bearsamppBins->getApache() && $bearsamppBins->getApache()->isEnable()) {
667 $paths .= self::getModuleSymlinkPath($bearsamppBins->getApache()) . '/bin;';
668 }
669 if ($bearsamppBins->getPhp() && $bearsamppBins->getPhp()->isEnable()) {
670 $paths .= self::getModuleSymlinkPath($bearsamppBins->getPhp()) . ';';
671 $paths .= self::getModuleSymlinkPath($bearsamppBins->getPhp()) . '/pear;';
672 $paths .= self::getModuleSymlinkPath($bearsamppBins->getPhp()) . '/deps;';
673 $paths .= self::getModuleSymlinkPath($bearsamppBins->getPhp()) . '/imagick;';
674 }
675 if ($bearsamppBins->getNodejs() && $bearsamppBins->getNodejs()->isEnable()) {
676 $paths .= self::getModuleSymlinkPath($bearsamppBins->getNodejs()) . ';';
677 }
678 }
679
680 // Add paths for enabled tools
681 if (isset($bearsamppTools)) {
682 if ($bearsamppTools->getComposer() && $bearsamppTools->getComposer()->isEnable()) {
683 $paths .= self::getModuleSymlinkPath($bearsamppTools->getComposer()) . ';';
684 $paths .= self::getModuleSymlinkPath($bearsamppTools->getComposer()) . '/vendor/bin;';
685 }
686 if ($bearsamppTools->getGhostscript() && $bearsamppTools->getGhostscript()->isEnable()) {
687 $paths .= self::getModuleSymlinkPath($bearsamppTools->getGhostscript()) . '/bin;';
688 }
689 if ($bearsamppTools->getGit() && $bearsamppTools->getGit()->isEnable()) {
690 $paths .= self::getModuleSymlinkPath($bearsamppTools->getGit()) . '/bin;';
691 }
692 if ($bearsamppTools->getNgrok() && $bearsamppTools->getNgrok()->isEnable()) {
693 $paths .= self::getModuleSymlinkPath($bearsamppTools->getNgrok()) . ';';
694 }
695 if ($bearsamppTools->getPerl() && $bearsamppTools->getPerl()->isEnable()) {
696 $paths .= self::getModuleSymlinkPath($bearsamppTools->getPerl()) . '/perl/site/bin;';
697 $paths .= self::getModuleSymlinkPath($bearsamppTools->getPerl()) . '/perl/bin;';
698 $paths .= self::getModuleSymlinkPath($bearsamppTools->getPerl()) . '/c/bin;';
699 }
700 if ($bearsamppTools->getPython() && $bearsamppTools->getPython()->isEnable()) {
701 $paths .= self::getModuleSymlinkPath($bearsamppTools->getPython()) . '/bin;';
702 }
703 if ($bearsamppTools->getRuby() && $bearsamppTools->getRuby()->isEnable()) {
704 $paths .= self::getModuleSymlinkPath($bearsamppTools->getRuby()) . '/bin;';
705 }
706 }
707
708 return self::formatWindowsPath($paths);
709 }
static getModuleSymlinkPath($module)

References $bearsamppBins, formatWindowsPath(), and getModuleSymlinkPath().

Referenced by Win32Service\create().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getNssmExe()

getNssmExe ( $aetrayPath = false)
static

Retrieves the path to the NSSM executable.

Parameters
bool$aetrayPathWhether to format the path for AeTrayMenu.
Returns
string The path to the NSSM executable.

Definition at line 648 of file class.path.php.

649 {
650 return self::getNssmPath($aetrayPath) . '/' . Core::NSSM_EXE;
651 }
const NSSM_EXE
static getNssmPath($aetrayPath=false)

References getNssmPath(), and Core\NSSM_EXE.

Referenced by Nssm\exec().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getNssmLogFilePath()

getNssmLogFilePath ( $aetrayPath = false)
static

Gets the path to the NSSM log file.

Parameters
bool$aetrayPathWhether to format the path for AeTrayMenu.
Returns
string The NSSM log file path.

Definition at line 717 of file class.path.php.

718 {
719 return self::getLogsPath($aetrayPath) . '/bearsampp-nssm.log';
720 }

References getLogsPath().

Referenced by Nssm\writeLog(), Nssm\writeLogError(), and Nssm\writeLogInfo().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getNssmPath()

getNssmPath ( $aetrayPath = false)
static

Retrieves the path to the NSSM directory.

Parameters
bool$aetrayPathWhether to format the path for AeTrayMenu.
Returns
string The path to the NSSM directory.

Definition at line 637 of file class.path.php.

638 {
639 return self::getLibsPath($aetrayPath) . '/nssm';
640 }

References getLibsPath().

Referenced by getNssmExe().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getOpenSslConf()

getOpenSslConf ( $aetrayPath = false)
static

Retrieves the path to the OpenSSL configuration file.

Parameters
bool$aetrayPathWhether to format the path for AeTrayMenu.
Returns
string The path to the OpenSSL configuration file.

Definition at line 728 of file class.path.php.

729 {
730 return self::getOpenSslPath($aetrayPath) . '/' . Core::OPENSSL_CONF;
731 }
const OPENSSL_CONF
static getOpenSslPath($aetrayPath=false)

References getOpenSslPath(), and Core\OPENSSL_CONF.

Here is the call graph for this function:

◆ getOpenSslExe()

getOpenSslExe ( $aetrayPath = false)
static

Retrieves the path to the OpenSSL executable.

Parameters
bool$aetrayPathWhether to format the path for AeTrayMenu.
Returns
string The path to the OpenSSL executable.

Definition at line 739 of file class.path.php.

740 {
741 return self::getOpenSslPath($aetrayPath) . '/' . Core::OPENSSL_EXE;
742 }
const OPENSSL_EXE

References getOpenSslPath(), and Core\OPENSSL_EXE.

Referenced by OpenSsl\createCrt().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getOpenSslPath()

getOpenSslPath ( $aetrayPath = false)
static

Retrieves the path to the OpenSSL directory.

Parameters
bool$aetrayPathWhether to format the path for AeTrayMenu.
Returns
string The path to the OpenSSL directory.

Definition at line 750 of file class.path.php.

751 {
752 return self::getLibsPath($aetrayPath) . '/openssl';
753 }

References getLibsPath().

Referenced by getOpenSslConf(), getOpenSslExe(), and Util\getPathsToScan().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getPathFormatCacheSize()

getPathFormatCacheSize ( )
static

Gets the current size of the path format cache.

Returns
int Number of cached path conversions.

Definition at line 284 of file class.path.php.

285 {
286 return count(self::$pathFormatCache);
287 }

◆ getPathFormatStats()

getPathFormatStats ( )
static

Gets path format cache statistics. Useful for monitoring cache effectiveness and tuning cache size.

Returns
array Array containing unix_hits, unix_misses, windows_hits, windows_misses.

Definition at line 189 of file class.path.php.

190 {
191 return self::$pathFormatStats;
192 }

◆ getPhpExe()

getPhpExe ( $aetrayPath = false)
static

Retrieves the path to the PHP executable.

Parameters
bool$aetrayPathWhether to format the path for AeTrayMenu.
Returns
string The path to the PHP executable.

Definition at line 772 of file class.path.php.

773 {
774 return self::getPhpPath($aetrayPath) . '/' . Core::PHP_EXE;
775 }
const PHP_EXE
static getPhpPath($aetrayPath=false)

References getPhpPath(), and Core\PHP_EXE.

Referenced by Batch\exitApp(), TplApp\getActionRun(), and Util\startLoading().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getPhpPath()

getPhpPath ( $aetrayPath = false)
static

Retrieves the path to the PHP directory.

Parameters
bool$aetrayPathWhether to format the path for AeTrayMenu.
Returns
string The path to the PHP directory.

Definition at line 761 of file class.path.php.

762 {
763 return self::getLibsPath($aetrayPath) . '/php';
764 }

References getLibsPath().

Referenced by getPhpExe().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getPowerShellPath()

getPowerShellPath ( )
static

Finds the path to the PowerShell executable in the Windows System32 directory.

Returns
string|false Returns the path to powershell.exe if found, otherwise false.

Definition at line 782 of file class.path.php.

783 {
784 if (is_dir('C:\Windows\System32\WindowsPowerShell')) {
785 return Util::findFile('C:\Windows\System32\WindowsPowerShell', 'powershell.exe');
786 }
787
788 return false;
789 }
static findFile($startPath, $findFile)

References Util\findFile().

Referenced by TplPowerShell\getTabPowerShellSection().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getProcessName()

getProcessName ( )
static

Gets the name of the process.

Returns
string The process name.

Definition at line 396 of file class.path.php.

397 {
398 return 'bearsampp';
399 }

◆ getPwgenExe()

getPwgenExe ( $aetrayPath = false)
static

Retrieves the path to the PWGen executable.

Parameters
bool$aetrayPathWhether to format the path for AeTrayMenu.
Returns
string The path to the PWGen executable.

Definition at line 808 of file class.path.php.

809 {
810 return self::getPwgenPath($aetrayPath) . '/' . Core::PWGEN_EXE;
811 }
const PWGEN_EXE
static getPwgenPath($aetrayPath=false)

References getPwgenPath(), and Core\PWGEN_EXE.

Referenced by TplAppTools\getMenuTools().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getPwgenPath()

getPwgenPath ( $aetrayPath = false)
static

Retrieves the path to the PWGen directory.

Parameters
bool$aetrayPathWhether to format the path for AeTrayMenu.
Returns
string The path to the PWGen directory.

Definition at line 797 of file class.path.php.

798 {
799 return self::getLibsPath($aetrayPath) . '/pwgen';
800 }

References getLibsPath().

Referenced by getPwgenExe().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getRegistryLogFilePath()

getRegistryLogFilePath ( $aetrayPath = false)
static

Gets the path to the registry log file.

Parameters
bool$aetrayPathWhether to format the path for AeTrayMenu.
Returns
string The registry log file path.

Definition at line 819 of file class.path.php.

820 {
821 return self::getLogsPath($aetrayPath) . '/bearsampp-registry.log';
822 }

References getLogsPath().

Referenced by Log\separator(), and Registry\writeLog().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getResourcesPath()

getResourcesPath ( $aetrayPath = false)
static

Retrieves the path to the resources.

Parameters
bool$aetrayPathWhether to format the path for AeTrayMenu.
Returns
string The path to the resources.

Definition at line 841 of file class.path.php.

842 {
843 return self::getCorePath($aetrayPath) . '/resources';
844 }

References getCorePath().

Referenced by QuickPick\__construct(), Core\getAppVersion(), getHomepagePath(), getLastPath(), Core\getLoadingPid(), and Util\getPathsToScan().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getRootPath()

◆ getScript()

getScript ( $type)
static

Retrieves the path to a specific script.

Parameters
string$typeThe type of script.
Returns
string The path to the script.

Definition at line 852 of file class.path.php.

853 {
854 return self::getScriptsPath() . '/' . $type;
855 }
static getScriptsPath($aetrayPath=false)

References getScriptsPath().

Here is the call graph for this function:

◆ getScriptsPath()

getScriptsPath ( $aetrayPath = false)
static

Retrieves the path to the scripts.

Parameters
bool$aetrayPathWhether to format the path for AeTrayMenu.
Returns
string The path to the scripts.

Definition at line 863 of file class.path.php.

864 {
865 return self::getCorePath($aetrayPath) . '/scripts';
866 }

References getCorePath().

Referenced by getScript().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getServicesLogFilePath()

getServicesLogFilePath ( $aetrayPath = false)
static

Gets the path to the services log file.

Parameters
bool$aetrayPathWhether to format the path for AeTrayMenu.
Returns
string The services log file path.

Definition at line 874 of file class.path.php.

875 {
876 return self::getLogsPath($aetrayPath) . '/bearsampp-services.log';
877 }

References getLogsPath().

Referenced by Log\separator(), and Win32Service\writeLog().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getSetEnvExe()

getSetEnvExe ( $aetrayPath = false)
static

Retrieves the path to the SetEnv executable.

Parameters
bool$aetrayPathWhether to format the path for AeTrayMenu.
Returns
string The path to the SetEnv executable.

Definition at line 896 of file class.path.php.

897 {
898 return self::getSetEnvPath($aetrayPath) . '/' . Core::SETENV_EXE;
899 }
const SETENV_EXE
static getSetEnvPath($aetrayPath=false)

References getSetEnvPath(), and Core\SETENV_EXE.

Referenced by Batch\refreshEnvVars().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getSetEnvPath()

getSetEnvPath ( $aetrayPath = false)
static

Retrieves the path to the SetEnv directory.

Parameters
bool$aetrayPathWhether to format the path for AeTrayMenu.
Returns
string The path to the SetEnv directory.

Definition at line 885 of file class.path.php.

886 {
887 return self::getLibsPath($aetrayPath) . '/setenv';
888 }

References getLibsPath().

Referenced by getSetEnvExe().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getSslConfPath()

getSslConfPath ( $aetrayPath = false)
static

Gets the path to the SSL configuration file.

Parameters
bool$aetrayPathWhether to format the path for AeTrayMenu.
Returns
string The SSL configuration file path.

Definition at line 907 of file class.path.php.

908 {
909 return self::getSslPath($aetrayPath) . '/openssl.cnf';
910 }
static getSslPath($aetrayPath=false)

References getSslPath().

Here is the call graph for this function:

◆ getSslPath()

getSslPath ( $aetrayPath = false)
static

Gets the path to the SSL directory.

Parameters
bool$aetrayPathWhether to format the path for AeTrayMenu.
Returns
string The SSL path.

Definition at line 918 of file class.path.php.

919 {
920 return self::getRootPath($aetrayPath) . '/ssl';
921 }

References getRootPath().

Referenced by ActionGenSslCertificate\__construct(), OpenSsl\delSslCertificate(), OpenSsl\ensureSslDirExists(), OpenSsl\existsCrt(), OpenSsl\genSslCertificate(), getSslConfPath(), BinApache\getVhostContent(), OpenSsl\isExpired(), and OpenSsl\makeRootCa().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getStartupLnkPath()

getStartupLnkPath ( )
static

Retrieves the path for the startup link file.

Returns
string The full path to the startup link file.

Definition at line 829 of file class.path.php.

830 {
831 $startupPath = Win32Native::getSpecialFolderPath('Startup');
832 return $startupPath ? $startupPath . '/' . APP_TITLE . '.lnk' : false;
833 }
static getSpecialFolderPath($folderName)
const APP_TITLE
Definition root.php:13

References APP_TITLE, and Win32Native\getSpecialFolderPath().

Referenced by Util\disableLaunchStartup(), Util\enableLaunchStartup(), and Util\isLaunchStartup().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getStartupLogFilePath()

getStartupLogFilePath ( $aetrayPath = false)
static

Gets the path to the startup log file.

Parameters
bool$aetrayPathWhether to format the path for AeTrayMenu.
Returns
string The startup log file path.

Definition at line 929 of file class.path.php.

930 {
931 return self::getLogsPath($aetrayPath) . '/bearsampp-startup.log';
932 }

References getLogsPath().

Referenced by Log\separator(), and ActionStartup\writeLog().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getTmpPath()

getTmpPath ( $aetrayPath = false)
static

Retrieves the path to the temporary directory.

Parameters
bool$aetrayPathWhether to format the path for AeTrayMenu.
Returns
string The path to the temporary directory.

Definition at line 940 of file class.path.php.

941 {
942 return self::getCorePath($aetrayPath) . '/tmp';
943 }

References getCorePath().

Referenced by ActionClearFolders\__construct(), ActionStartup\cleanTmpFolders(), ActionQuit\cleanupTemporaryFiles(), Cache\clear(), Util\clearLoadingText(), QuickPick\fetchAndUnzipModule(), Cache\get(), Cache\getCacheIntegrityKey(), Core\getExec(), Batch\getTmpFile(), Log\initializeAsyncQueue(), Util\openFileContent(), Root\register(), ActionStartup\rotationLogs(), Cache\set(), ActionLoading\updateLabelFromStatusFile(), and Util\updateLoadingText().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getToolsPath()

getToolsPath ( $aetrayPath = false)
static

Gets the path to the tools directory.

Parameters
bool$aetrayPathWhether to format the path for AeTrayMenu.
Returns
string The tools path.

Definition at line 951 of file class.path.php.

952 {
953 return self::getRootPath($aetrayPath) . '/tools';
954 }

References getRootPath().

Referenced by Symlinks\deleteCurrentSymlinks(), QuickPick\getModuleDestinationPath(), Symlinks\isPathWithinAllowedBase(), and Module\reload().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getVhostsPath()

getVhostsPath ( $aetrayPath = false)
static

Gets the path to the virtual hosts directory.

Parameters
bool$aetrayPathWhether to format the path for AeTrayMenu.
Returns
string The virtual hosts path.

Definition at line 994 of file class.path.php.

995 {
996 return self::getRootPath($aetrayPath) . '/vhosts';
997 }

References getRootPath().

Referenced by ActionEditVhost\createFormFields(), ActionEditVhost\deleteItem(), ActionEditVhost\getDeleteErrorMessage(), Util\getPathsToScan(), BinApache\getVhosts(), BinApache\getVhostsUrl(), ActionEditVhost\initializeDialog(), ActionAddVhost\itemExists(), ActionEditVhost\itemExists(), BinApache\refreshVhosts(), ActionAddVhost\saveItem(), ActionEditVhost\saveItem(), and BinApache\updateConfig().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getWebIconsPath()

getWebIconsPath ( )
static

Retrieves the web icons path.

Returns
string The web icons path.

Definition at line 1004 of file class.path.php.

1005 {
1006 return self::getWebImagesPath() . '/icons';
1007 }
static getWebImagesPath()

References getWebImagesPath().

Here is the call graph for this function:

◆ getWebImagesPath()

getWebImagesPath ( )
static

Retrieves the web images path.

Returns
string The web images path.

Definition at line 1014 of file class.path.php.

1015 {
1016 return self::getWebResourcesPath() . '/img';
1017 }
static getWebResourcesPath()

References getWebResourcesPath().

Referenced by getWebIconsPath().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getWebResourcesPath()

getWebResourcesPath ( )
static

Retrieves the web resources path.

Returns
string The web resources path.

Definition at line 1024 of file class.path.php.

1025 {
1026 return rtrim(md5(APP_TITLE), '/');
1027 }

References APP_TITLE.

Referenced by BinApache\checkPort(), getWebImagesPath(), getWebResourcesUrl(), and Homepage\refreshAliasContent().

Here is the caller graph for this function:

◆ getWebResourcesUrl()

getWebResourcesUrl ( )
static

Retrieves the URL to the web resources.

Returns
string The web resources URL.

Definition at line 1034 of file class.path.php.

1035 {
1036 global $bearsamppBins;
1037 $request = self::getWebResourcesPath();
1038 $isHttps = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off');
1039 $scheme = $isHttps ? 'https://' : 'http://';
1040 $host = (isset($_SERVER['SERVER_NAME'])) ? $_SERVER['SERVER_NAME'] : 'localhost';
1041
1042 $port = 80;
1043 if (isset($bearsamppBins) && $bearsamppBins->getApache() !== null) {
1044 $port = $isHttps ? $bearsamppBins->getApache()->getSslPort() : $bearsamppBins->getApache()->getPort();
1045 }
1046
1047 $portSuffix = '';
1048 if ($isHttps) {
1049 if ($port != 443) {
1050 $portSuffix = ':' . $port;
1051 }
1052 } else {
1053 if ($port != 80) {
1054 $portSuffix = ':' . $port;
1055 }
1056 }
1057
1058 return $scheme . $host . $portSuffix . (!empty($request) ? '/' . $request : '');
1059 }

References $bearsamppBins, $port, and getWebResourcesPath().

Here is the call graph for this function:

◆ getWinbinderLogFilePath()

getWinbinderLogFilePath ( $aetrayPath = false)
static

Gets the path to the Winbinder log file.

Parameters
bool$aetrayPathWhether to format the path for AeTrayMenu.
Returns
string The Winbinder log file path.

Definition at line 1067 of file class.path.php.

1068 {
1069 return self::getLogsPath($aetrayPath) . '/bearsampp-winbinder.log';
1070 }

References getLogsPath().

Referenced by Log\separator(), and WinBinder\writeLog().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getWwwPath()

getWwwPath ( $aetrayPath = false)
static

◆ init()

init ( $rootPath,
$corePath )
static

Initializes the Path class with root and core paths.

Parameters
string$rootPathThe root path of the application.
string$corePathThe path to the core directory.
Returns
void

Definition at line 84 of file class.path.php.

85 {
86 self::$rootPath = str_replace('\\', '/', rtrim($rootPath, '/\\'));
87 self::$corePath = str_replace('\\', '/', rtrim($corePath, '/\\'));
88 }

References $corePath, and $rootPath.

Referenced by Root\__construct().

Here is the caller graph for this function:

Field Documentation

◆ $corePath

$corePath
staticprivate

Definition at line 75 of file class.path.php.

Referenced by init().

◆ $pathFormatCache

$pathFormatCache = []
staticprivate

Definition at line 63 of file class.path.php.

◆ $pathFormatCacheMaxSize

$pathFormatCacheMaxSize = 500
staticprivate

Definition at line 94 of file class.path.php.

◆ $pathFormatStats

$pathFormatStats
staticprivate
Initial value:
= [
'unix_hits' => 0,
'unix_misses' => 0,
'windows_hits' => 0,
'windows_misses' => 0,
]

Definition at line 100 of file class.path.php.

◆ $rootPath

$rootPath
staticprivate

Definition at line 69 of file class.path.php.

Referenced by aetrayPath(), changePath(), and init().


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