X7ROOT File Manager
Current Path:
/opt/cpanel/ea-wappspector/src/MatchResult
opt
/
cpanel
/
ea-wappspector
/
src
/
MatchResult
/
??
..
??
CakePHP.php
(182 B)
??
CodeIgniter.php
(194 B)
??
Composer.php
(185 B)
??
DotNet.php
(177 B)
??
Drupal.php
(179 B)
??
Duda.php
(176 B)
??
EmptyMatchResult.php
(512 B)
??
Joomla.php
(180 B)
??
Laravel.php
(182 B)
??
MatchResult.php
(2.68 KB)
??
MatchResultInterface.php
(427 B)
??
NodeJs.php
(180 B)
??
Php.php
(170 B)
??
Prestashop.php
(191 B)
??
Python.php
(179 B)
??
Ruby.php
(173 B)
??
Sitejet.php
(182 B)
??
Siteplus.php
(185 B)
??
Sitepro.php
(183 B)
??
Symfony.php
(182 B)
??
Typo3.php
(176 B)
??
WebPresenceBuilder.php
(215 B)
??
Wordpress.php
(188 B)
??
Yii.php
(170 B)
Editing: MatchResult.php
<?php declare(strict_types=1); namespace Plesk\Wappspector\MatchResult; use JsonSerializable; use League\Flysystem\PathTraversalDetected; use League\Flysystem\WhitespacePathNormalizer; class MatchResult implements MatchResultInterface, JsonSerializable { public const ID = null; public const NAME = null; public function __construct( protected string $path, protected ?string $version = null, protected ?string $application = null, ) { try { $this->path = (new WhitespacePathNormalizer())->normalizePath($this->path); } catch (PathTraversalDetected) { $this->path = '/'; } } public function getId(): string { return static::ID; } public function getName(): string { return static::NAME; } public function getPath(): string { return $this->path; } public function getVersion(): ?string { return $this->version; } public function getApplication(): ?string { return $this->application; } public function jsonSerialize(): array { return [ 'id' => $this->getId(), 'name' => $this->getName(), 'path' => $this->getPath(), 'version' => $this->getVersion(), 'application' => $this->getApplication(), ]; } public static function createById( string $id, ?string $path = null, ?string $version = null, ?string $application = null ): MatchResultInterface { $classname = match ($id) { CakePHP::ID => CakePHP::class, CodeIgniter::ID => CodeIgniter::class, Composer::ID => Composer::class, DotNet::ID => DotNet::class, Drupal::ID => Drupal::class, Joomla::ID => Joomla::class, Laravel::ID => Laravel::class, NodeJs::ID => NodeJs::class, Php::ID => Php::class, Prestashop::ID => Prestashop::class, Python::ID => Python::class, Ruby::ID => Ruby::class, Symfony::ID => Symfony::class, Typo3::ID => Typo3::class, Wordpress::ID => Wordpress::class, Yii::ID => Yii::class, Sitejet::ID => Sitejet::class, WebPresenceBuilder::ID => WebPresenceBuilder::class, Sitepro::ID => Sitepro::class, Duda::ID => Duda::class, Siteplus::ID => Siteplus::class, default => null, }; if (!$classname) { return new EmptyMatchResult(); } return new $classname(path: $path ?? '', version: $version, application: $application); } }
Upload File
Create Folder