/var/www/vhosts/ihelp.ro/httpdocs/vendor/cakephp/cakephp/src/I18n
NameSizeModeActions
Exception/-0755rm
Formatter/-0755rm
Middleware/-0755rm
Parser/-0755rm
ChainMessagesLoader.php23220644editdlrm
composer.json12810644editdlrm
Date.php74610644editdlrm
DateFormatTrait.php177740644editdlrm
FormatterInterface.php12760644editdlrm
FormatterLocator.php28640644editdlrm
FrozenDate.php72890644editdlrm
FrozenTime.php100630644editdlrm
functions.php88550644editdlrm
I18n.php96210644editdlrm
I18nDateTimeInterface.php97090644editdlrm
LICENSE.txt12040644editdlrm
MessagesFileLoader.php55550644editdlrm
Number.php180140644editdlrm
Package.php39720644editdlrm
PackageLocator.php34880644editdlrm
PluralRules.php58900644editdlrm
README.md28790644editdlrm
RelativeTimeFormatter.php152960644editdlrm
Time.php125870644editdlrm
Translator.php60140644editdlrm
TranslatorRegistry.php101990644editdlrm
Edit: /var/www/vhosts/ihelp.ro/httpdocs/vendor/cakephp/cakephp/src/I18n/MessagesFileLoader.php (5555B)
_name = $name; $this->_locale = $locale; $this->_extension = $extension; } /** * Loads the translation file and parses it. Returns an instance of a translations * package containing the messages loaded from the file. * * @return \Cake\I18n\Package|false * @throws \RuntimeException if no file parser class could be found for the specified * file extension. */ public function __invoke() { $folders = $this->translationsFolders(); $ext = $this->_extension; $file = false; $fileName = $this->_name; $pos = strpos($fileName, '/'); if ($pos !== false) { $fileName = substr($fileName, $pos + 1); } foreach ($folders as $folder) { $path = $folder . $fileName . ".$ext"; if (is_file($path)) { $file = $path; break; } } if (!$file) { return false; } $name = ucfirst($ext); $class = App::className($name, 'I18n\Parser', 'FileParser'); if (!$class) { throw new RuntimeException(sprintf('Could not find class %s', "{$name}FileParser")); } $messages = (new $class())->parse($file); $package = new Package('default'); $package->setMessages($messages); return $package; } /** * Returns the folders where the file should be looked for according to the locale * and package name. * * @return array The list of folders where the translation file should be looked for */ public function translationsFolders(): array { $locale = Locale::parseLocale($this->_locale) + ['region' => null]; $folders = [ implode('_', [$locale['language'], $locale['region']]), $locale['language'], ]; $searchPaths = []; $localePaths = App::path('locales'); if (empty($localePaths) && defined('APP')) { $localePaths[] = ROOT . 'resources' . DIRECTORY_SEPARATOR . 'locales' . DIRECTORY_SEPARATOR; } foreach ($localePaths as $path) { foreach ($folders as $folder) { $searchPaths[] = $path . $folder . DIRECTORY_SEPARATOR; } } // If space is not added after slash, the character after it remains lowercased $pluginName = Inflector::camelize(str_replace('/', '/ ', $this->_name)); if (Plugin::isLoaded($pluginName)) { $basePath = App::path('locales', $pluginName)[0]; foreach ($folders as $folder) { $searchPaths[] = $basePath . $folder . DIRECTORY_SEPARATOR; } } return $searchPaths; } }