$60 GRAYBYTE WORDPRESS FILE MANAGER $43

SERVER : premium201.web-hosting.com #1 SMP Wed Mar 26 12:08:09 UTC 2025
SERVER IP : 172.67.162.162 | ADMIN IP 216.73.216.51
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : NONE

/opt/cpanel/ea-wappspector/src/Matchers/

HOME
Current File : /opt/cpanel/ea-wappspector/src/Matchers//Siteplus.php
<?php

declare(strict_types=1);

namespace Plesk\Wappspector\Matchers;

use League\Flysystem\Filesystem;
use Plesk\Wappspector\Helper\InspectorHelper;
use Plesk\Wappspector\MatchResult\EmptyMatchResult;
use Plesk\Wappspector\MatchResult\MatchResultInterface;
use Plesk\Wappspector\MatchResult\Siteplus as MatchResult;

class Siteplus implements MatcherInterface
{
    private const PUBLISH_DIR_PATH = '/bundle/publish';

    public function match(Filesystem $fs, string $path): MatchResultInterface
    {
        $rTrimPath = rtrim($path, '/');

        $inspectorHelper = new InspectorHelper();

        if (!$inspectorHelper->fileContainsString($fs, $rTrimPath . '/index.html', 'edit.site')) {
            return new EmptyMatchResult();
        }

        if (!$fs->directoryExists($rTrimPath . self::PUBLISH_DIR_PATH)) {
            return new EmptyMatchResult();
        }

        $publishDirList = $fs->listContents($rTrimPath . self::PUBLISH_DIR_PATH, false);

        // do not check if the item is a directory as on the server when the files a copied the type of the
        // directory is determined as 'file'.
        // By default, there should be just 1 directory in the publish directory
        $versionDirPath = $publishDirList->toArray()[0]['path'] ?? null;

        if ($versionDirPath === null) {
            return new EmptyMatchResult();
        }

        return $inspectorHelper->fileContainsString($fs, $versionDirPath . '/bundle.js', 'siteplus')
            ? new MatchResult($rTrimPath, $this->getSiteplusVersion($versionDirPath))
            : new EmptyMatchResult();
    }

    private function getSiteplusVersion(string $versionDirPath): string
    {
        // get the last part of the path
        $versionDirPathParts = explode('/', $versionDirPath);
        return end($versionDirPathParts);
    }
}

Current_dir [ NOT WRITEABLE ] Document_root [ NOT WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
15 May 2026 8.30 AM
root / root
0755
CakePHP.php
1.021 KB
14 May 2026 3.20 PM
root / root
0644
CodeIgniter.php
1.136 KB
14 May 2026 3.20 PM
root / root
0644
Composer.php
1.089 KB
14 May 2026 3.20 PM
root / root
0644
DotNet.php
1.054 KB
14 May 2026 3.20 PM
root / root
0644
Drupal.php
1.626 KB
14 May 2026 3.20 PM
root / root
0644
Duda.php
1.72 KB
14 May 2026 3.20 PM
root / root
0644
Joomla.php
3.788 KB
14 May 2026 3.20 PM
root / root
0644
Laravel.php
1.9 KB
14 May 2026 3.20 PM
root / root
0644
MatcherInterface.php
0.335 KB
14 May 2026 3.20 PM
root / root
0644
NodeJs.php
0.846 KB
14 May 2026 3.20 PM
root / root
0644
Php.php
1.07 KB
14 May 2026 3.20 PM
root / root
0644
Prestashop.php
1.409 KB
14 May 2026 3.20 PM
root / root
0644
Python.php
0.725 KB
14 May 2026 3.20 PM
root / root
0644
Ruby.php
0.696 KB
14 May 2026 3.20 PM
root / root
0644
Sitejet.php
0.953 KB
14 May 2026 3.20 PM
root / root
0644
Siteplus.php
1.791 KB
14 May 2026 3.20 PM
root / root
0644
Sitepro.php
0.957 KB
14 May 2026 3.20 PM
root / root
0644
Symfony.php
0.884 KB
14 May 2026 3.20 PM
root / root
0644
Typo3.php
1.768 KB
14 May 2026 3.20 PM
root / root
0644
UpLevelMatcherTrait.php
0.959 KB
14 May 2026 3.20 PM
root / root
0644
WebPresenceBuilder.php
1.969 KB
14 May 2026 3.20 PM
root / root
0644
Wordpress.php
1.477 KB
14 May 2026 3.20 PM
root / root
0644
Yii.php
1.641 KB
14 May 2026 3.20 PM
root / root
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2026 CONTACT ME
Static GIF Static GIF