File ManagerCurrent Directory: wp-content/plugins/backwpup/vendor/symfony/translation/ExtractorLinux appserver-0d5e4f1e-php-cc8da225320a42ba9b7d66cba40b1f03 6.6.123+ #1 SMP PREEMPT_DYNAMIC Wed Mar 11 09:04:28 UTC 2026 x86_64Edit File: AbstractFileExtractor.php <?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Translation\Extractor; use Symfony\Component\Translation\Exception\InvalidArgumentException; /** * Base class used by classes that extract translation messages from files. * * @author Marcos D. Sánchez <marcosdsanchez@gmail.com> */ abstract class AbstractFileExtractor { /** * @param string|iterable $resource Files, a file or a directory * * @return iterable */ protected function extractFiles($resource) { if (is_iterable($resource)) { $files = []; foreach ($resource as $file) { if ($this->canBeExtracted($file)) { $files[] = $this->toSplFileInfo($file); } } } elseif (is_file($resource)) { $files = $this->canBeExtracted($resource) ? [$this->toSplFileInfo($resource)] : []; } else { $files = $this->extractFromDirectory($resource); } return $files; } private function toSplFileInfo(string $file): \SplFileInfo { return new \SplFileInfo($file); } /** * @param string $file * * @return bool * * @throws InvalidArgumentException */ protected function isFile($file) { if (!is_file($file)) { throw new InvalidArgumentException(sprintf('The "%s" file does not exist.', $file)); } return true; } /** * @param string $file * * @return bool */ abstract protected function canBeExtracted($file); /** * @param string|array $resource Files, a file or a directory * * @return iterable files to be extracted */ abstract protected function extractFromDirectory($resource); } Upload File Directory Listing NameTypeSizeActions.. (Parent Directory)DirAbstractFileExtractor.phpFile1.94 KB Rename | Delete | EditChainExtractor.phpFile1.30 KB Rename | Delete | EditExtractorInterface.phpFile1,013.00 B Rename | Delete | EditPhpExtractor.phpFile8.34 KB Rename | Delete | EditPhpStringTokenParser.phpFile4.29 KB Rename | Delete | Edit