A ServiceLocator implementation for loading and retaining formatter objects.
array<bool>
Tracks whether a registry entry has been converted from a FQCN to a formatter object.
array<string,Cake\I18n\FormatterInterface|class-stringCake\I18n\FormatterInterface>>
A registry to retain formatter objects.
Constructor.
Gets a formatter from the registry by name.
Sets a formatter into the registry by name.
__construct(array<string, class-stringCake\I18n\FormatterInterface>> $registry = [])
Constructor.
array<string, class-stringCake\I18n\FormatterInterface>>
$registry optional An array of key-value pairs where the key is the formatter name the value is a FQCN for the formatter.
get(string $name): Cake\I18n\FormatterInterface
Gets a formatter from the registry by name.
string
$name The formatter to retrieve.
Cake\I18n\FormatterInterface
Cake\I18n\Exception\I18nException
set(string $name, class-stringCake\I18n\FormatterInterface> $className): void
Sets a formatter into the registry by name.
string
$name The formatter name.
class-stringCake\I18n\FormatterInterface>
$className A FQCN for a formatter.
void
Tracks whether a registry entry has been converted from a FQCN to a formatter object.
array<bool>
A registry to retain formatter objects.
array<string,Cake\I18n\FormatterInterface|class-stringCake\I18n\FormatterInterface>>
© 2005–present The Cake Software Foundation, Inc.
Licensed under the MIT License.
CakePHP is a registered trademark of Cake Software Foundation, Inc.
We are not endorsed by or affiliated with CakePHP.
https://api.cakephp.org/4.4/class-Cake.I18n.FormatterLocator.html