<?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\Sitepro as MatchResult;
class Sitepro implements MatcherInterface
{
public function match(Filesystem $fs, string $path): MatchResultInterface
{
$rTrimPath = rtrim($path, '/');
$siteproFolderPath = $rTrimPath . '/sitepro';
if (!$fs->directoryExists($siteproFolderPath)) {
return new EmptyMatchResult();
}
$inspectorHelper = new InspectorHelper();
return $inspectorHelper->fileContainsString($fs, $rTrimPath . '/web.config', 'sitepro')
|| $inspectorHelper->fileContainsString($fs, $rTrimPath . '/.htaccess', 'sitepro')
? new MatchResult($path)
: new EmptyMatchResult();
}
}
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| CakePHP.php | File | 1.02 KB | 0644 |
|
| CodeIgniter.php | File | 1.14 KB | 0644 |
|
| Composer.php | File | 1.09 KB | 0644 |
|
| DotNet.php | File | 1.05 KB | 0644 |
|
| Drupal.php | File | 1.63 KB | 0644 |
|
| Duda.php | File | 1.72 KB | 0644 |
|
| Joomla.php | File | 3.79 KB | 0644 |
|
| Laravel.php | File | 1.9 KB | 0644 |
|
| MatcherInterface.php | File | 343 B | 0644 |
|
| NodeJs.php | File | 866 B | 0644 |
|
| Php.php | File | 1.07 KB | 0644 |
|
| Prestashop.php | File | 1.41 KB | 0644 |
|
| Python.php | File | 742 B | 0644 |
|
| Ruby.php | File | 713 B | 0644 |
|
| Sitejet.php | File | 976 B | 0644 |
|
| Siteplus.php | File | 1.79 KB | 0644 |
|
| Sitepro.php | File | 980 B | 0644 |
|
| Symfony.php | File | 905 B | 0644 |
|
| Typo3.php | File | 1.77 KB | 0644 |
|
| UpLevelMatcherTrait.php | File | 982 B | 0644 |
|
| WebPresenceBuilder.php | File | 1.97 KB | 0644 |
|
| Wordpress.php | File | 1.48 KB | 0644 |
|
| Yii.php | File | 1.64 KB | 0644 |
|