Файловый менеджер - Редактировать - /home/tuudkjt/globeasy/wp-content/plugins/reviewx/vendor/wpdrill/core/src/ConfigManager.php
Назад
<?php namespace Rvx\WPDrill; use Rvx\Noodlehaus\Exception\EmptyDirectoryException; use Rvx\Noodlehaus\Parser\ParserInterface; class ConfigManager extends \Rvx\Noodlehaus\Config { /** * Loads configuration from file. * * @param string|array $path Filenames or directories with configuration * @param ParserInterface $parser Configuration parser * * @throws EmptyDirectoryException If `$path` is an empty directory */ protected function loadFromFile($path, ParserInterface $parser = null) { $paths = $this->getValidPath($path); $this->data = []; foreach ($paths as $path) { if ($parser === null) { list($filename, $extension) = $this->getFileInfo($path); // Skip the `dist` extension if ($extension === 'dist') { $extension = \array_pop($parts); } // Get file parser $parser = $this->getParser($extension); // Try to load file $this->data[$filename] = $parser->parseFile($path); // Clean parser $parser = null; } else { // Try to load file using specified parser list($filename, $extension) = $this->getFileInfo($path); $this->data[$filename] = $parser->parseFile($path); } } } protected function getFileInfo($path) { $info = \pathinfo($path); $parts = \explode('.', $info['basename']); $extension = \array_pop($parts); $filename = $info['filename']; // Skip the `dist` extension if ($extension === 'dist') { $extension = \array_pop($parts); } return [$filename, $extension]; } }
| ver. 1.6 |
Github
|
.
| PHP 8.1.34 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка