/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/PackageLocator.php (3488B)
> */ protected $registry = []; /** * Tracks whether a registry entry has been converted from a * callable to a Package object. * * @var array> */ protected $converted = []; /** * Constructor. * * @param array> $registry A registry of packages. * @see PackageLocator::$registry */ public function __construct(array $registry = []) { foreach ($registry as $name => $locales) { foreach ($locales as $locale => $spec) { $this->set($name, $locale, $spec); } } } /** * Sets a Package loader. * * @param string $name The package name. * @param string $locale The locale for the package. * @param \Cake\I18n\Package|callable $spec A callable that returns a package or Package instance. * @return void */ public function set(string $name, string $locale, $spec): void { $this->registry[$name][$locale] = $spec; $this->converted[$name][$locale] = $spec instanceof Package; } /** * Gets a Package object. * * @param string $name The package name. * @param string $locale The locale for the package. * @return \Cake\I18n\Package */ public function get(string $name, string $locale): Package { if (!isset($this->registry[$name][$locale])) { throw new I18nException("Package '$name' with locale '$locale' is not registered."); } if (!$this->converted[$name][$locale]) { /** @var callable $func */ $func = $this->registry[$name][$locale]; $this->registry[$name][$locale] = $func(); $this->converted[$name][$locale] = true; } /** @var \Cake\I18n\Package */ return $this->registry[$name][$locale]; } /** * Check if a Package object for given name and locale exists in registry. * * @param string $name The package name. * @param string $locale The locale for the package. * @return bool */ public function has(string $name, string $locale): bool { return isset($this->registry[$name][$locale]); } }