REDROOM
PHP 8.2.31
Path:
Logout
Edit File
Size: 3.69 KB
Close
/proc/thread-self/root/usr/local/lsws/add-ons/webcachemgr/src/Panel/CustomPanelExample.php
Text
Base64
<?php /** ****************************************** * LiteSpeed Web Server Cache Manager * * @author LiteSpeed Technologies, Inc. (https://www.litespeedtech.com) * @copyright 2026 LiteSpeed Technologies, Inc. * @since 1.17.8 * ******************************************* */ namespace Lsc\Wp\Panel; use Lsc\Wp\WPInstall; /** * Example CustomPanel implementation for third-party integrators. * * To use this template: * 1. Copy this file to $lsws_home/admin/lscdata/custom/CustomPanel.php * 2. Rename both the file and the class: file must be CustomPanel.php and * the class declaration must read "class CustomPanel" * 3. Customize the method implementations for your panel * * The framework expects the deployed file to declare class * \Lsc\Wp\Panel\CustomPanel extending \Lsc\Wp\Panel\CustomPanelBase. * * @see \Lsc\Wp\Panel\CustomPanelBase * @see \Lsc\Wp\Panel\ControlPanel::initByClassName() * @since 1.17.8 */ class CustomPanelExample extends CustomPanelBase { /** * * @since 1.17.8 */ protected function __construct() { /** @noinspection PhpUnhandledExceptionInspection */ parent::__construct(); } /** * * @since 1.17.8 */ protected function init2() { /** * Panel name can be set to whatever you'd like. */ $this->panelName = 'customPanel'; /** * Optionally set a default server-level cache root directory. * This is used when no explicit cache root has been configured. * Example: $this->defaultSvrCacheRoot = '/var/lscache/'; */ /** @noinspection PhpUnhandledExceptionInspection */ parent::init2(); } /** * Gets a list of found docroots and associated server names. * Only needed for lscmctl 'scan' command. * * @since 1.17.8 */ protected function prepareDocrootMap() { /** * This function can be left as is if you do not intend to use * the lscmctl 'scan' command. In this case lscmctl command * 'addinstalls' can be used to add WordPress installations to the * custom data file instead. * * If you would like to add support for the lscmctl 'scan' command, * implement this function so that it searches for all document root, * server name, and server alias groups and uses this information to * populate $this->docRootMap as follows: * * array( * 'docroots' => array(index => docroot), * 'names' => array("server name/alias" => index) * ); * * Where the value of each discovered servername/alias in the 'names' * array matches the index of the related document root in the * 'docroots' array. */ $this->docRootMap = array('docroots' => array(), 'names' => array()); } /** * This function returns the PHP binary to be used when performing * WordPress related actions for the WordPress installation associated with * the passed in WPInstall object. * * @since 1.17.8 * * @param WPInstall $wpInstall * @return string */ public function getPhpBinary( WPInstall $wpInstall ) { /** * If PHP binary $phpBin can be more accurately detected for the given * installation, do so here. The $wpInstall object provides context * such as the install's document root and owner information that can * be used to select the correct PHP binary, e.g.: * $ownerInfo = $wpInstall->getOwnerInfo(); * $user = $ownerInfo['user_name']; */ $phpBin = 'php'; return "{$phpBin} {$this->phpOptions}"; } }
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 0 × Files: 6
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
ControlPanel.php
30.49 KB
lrw-rw-r--
2026-05-26 17:51:34
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
CPanel.php
23.89 KB
lrw-rw-r--
2026-05-26 17:51:34
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
CustomPanelBase.php
1.09 KB
lrw-rw-r--
2026-05-26 17:51:34
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
CustomPanelExample.php
3.69 KB
lrw-rw-r--
2026-05-26 17:51:34
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
DirectAdmin.php
15.16 KB
lrw-rw-r--
2026-05-26 17:51:34
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Plesk.php
11.95 KB
lrw-rw-r--
2026-05-26 17:51:34
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).