X7ROOT File Manager
Current Path:
/home/gfecatvj/sites/realesbar/vendor/symfony/translation/Loader
home
/
gfecatvj
/
sites
/
realesbar
/
vendor
/
symfony
/
translation
/
Loader
/
📁
..
📄
ArrayLoader.php
(1.38 KB)
📄
CsvFileLoader.php
(1.69 KB)
📄
FileLoader.php
(1.77 KB)
📄
IcuDatFileLoader.php
(1.83 KB)
📄
IcuResFileLoader.php
(2.82 KB)
📄
IniFileLoader.php
(560 B)
📄
JsonFileLoader.php
(1.65 KB)
📄
LoaderInterface.php
(1.1 KB)
📄
MoFileLoader.php
(4.17 KB)
📄
PhpFileLoader.php
(1.13 KB)
📄
PoFileLoader.php
(4.99 KB)
📄
QtFileLoader.php
(2.81 KB)
📄
XliffFileLoader.php
(7.73 KB)
📄
YamlFileLoader.php
(1.59 KB)
Editing: FileLoader.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\Loader; use Symfony\Component\Config\Resource\FileResource; use Symfony\Component\Translation\Exception\InvalidResourceException; use Symfony\Component\Translation\Exception\NotFoundResourceException; /** * @author Abdellatif Ait boudad <a.aitboudad@gmail.com> */ abstract class FileLoader extends ArrayLoader { /** * {@inheritdoc} */ public function load($resource, string $locale, string $domain = 'messages') { if (!stream_is_local($resource)) { throw new InvalidResourceException(sprintf('This is not a local file "%s".', $resource)); } if (!file_exists($resource)) { throw new NotFoundResourceException(sprintf('File "%s" not found.', $resource)); } $messages = $this->loadResource($resource); // empty resource if (null === $messages) { $messages = []; } // not an array if (!\is_array($messages)) { throw new InvalidResourceException(sprintf('Unable to load file "%s".', $resource)); } $catalogue = parent::load($messages, $locale, $domain); if (class_exists('Symfony\Component\Config\Resource\FileResource')) { $catalogue->addResource(new FileResource($resource)); } return $catalogue; } /** * @param string $resource * * @return array * * @throws InvalidResourceException if stream content has an invalid format */ abstract protected function loadResource($resource); }
Upload File
Create Folder