Class FormatterLocator
A ServiceLocator implementation for loading and retaining formatter objects.
        
    Namespace: Cake\I18n
    
    
    
      
  
      Property Summary
- 
        $converted protectedarray<bool>Tracks whether a registry entry has been converted from a FQCN to a formatter object. 
- 
        $registry protectedarrayA registry to retain formatter objects. 
Method Summary
- 
          __construct() publicConstructor. 
- 
          get() publicGets a formatter from the registry by name. 
- 
          set() publicSets a formatter into the registry by name. 
Method Detail
__construct() ¶ public
__construct(array $registry = [])Constructor.
Parameters
- 
                array$registry optional
- An array of key-value pairs where the key is the formatter name the value is a FQCN for the formatter. 
get() ¶ public
get(string $name): Cake\I18n\FormatterInterfaceGets a formatter from the registry by name.
Parameters
- 
                string$name
- The formatter to retrieve. 
Returns
Cake\I18n\FormatterInterfaceA formatter object.
Throws
Cake\I18n\Exception\I18nExceptionset() ¶ public
set(string $name, string $className): voidSets a formatter into the registry by name.
Parameters
- 
                string$name
- The formatter name. 
- 
                string$className
- A FQCN for a formatter. 
Returns
void