?????????? ????????? - ??????????????? - /home/agenciai/public_html/cd38d8/Laravel.php.tar
???????
opt/cpanel/ea-wappspector/src/MatchResult/Laravel.php 0000644 00000000266 15127667144 0016704 0 ustar 00 <?php declare(strict_types=1); namespace Plesk\Wappspector\MatchResult; class Laravel extends MatchResult { public const ID = 'laravel'; public const NAME = 'Laravel'; } opt/cpanel/ea-wappspector/src/Matchers/Laravel.php 0000644 00000003632 15131765142 0016207 0 ustar 00 <?php namespace Plesk\Wappspector\Matchers; use JsonException; use League\Flysystem\Filesystem; use League\Flysystem\FilesystemException; use Plesk\Wappspector\MatchResult\EmptyMatchResult; use Plesk\Wappspector\MatchResult\Laravel as MatchResult; use Plesk\Wappspector\MatchResult\MatchResultInterface; class Laravel implements MatcherInterface { use UpLevelMatcherTrait; private const VERSION_FILE = 'vendor/laravel/framework/src/Illuminate/Foundation/Application.php'; private const COMPOSER_JSON = 'composer.json'; private const ARTISAN = 'artisan'; /** * @throws FilesystemException */ protected function doMatch(Filesystem $fs, string $path): MatchResultInterface { $path = rtrim($path, '/'); if (!$fs->fileExists($path . '/' . self::ARTISAN)) { return new EmptyMatchResult(); } return new MatchResult($path, $this->detectVersion($path, $fs)); } private function detectVersion(string $path, Filesystem $fs): ?string { $result = null; $versionFile = $path . '/' . self::VERSION_FILE; if ($fs->fileExists($versionFile)) { preg_match("/VERSION\\s*=\\s*'([^']+)'/", $fs->read($versionFile), $matches); if ($matches !== []) { $result = $matches[1]; } } else { $composerJsonFile = $path . '/' . self::COMPOSER_JSON; if ($fs->fileExists($composerJsonFile)) { try { $json = json_decode($fs->read($composerJsonFile), true, 512, JSON_THROW_ON_ERROR); if ($laravelPackage = $json['require']['laravel/framework'] ?? null) { $result = str_replace('^', '', $laravelPackage); } } catch (JsonException) { // ignore composer.json errors } } } return $result; } }
| ver. 1.6 |
Github
|
.
| PHP 8.2.30 | ??????????? ?????????: 0 |
proxy
|
phpinfo
|
???????????