Model
CountryRegistry
Magento\TwoFactorAuth\Model\CountryRegistry
What it does
This class serves as an in-memory registry/cache for Country entities in the Two-Factor Authentication module.
Developers use it to store and retrieve country objects by ID or country code without repeatedly querying the database, improving performance when validating phone numbers or managing country-specific 2FA settings.
Public Methods
- removeById()
- retrieveById()
- retrieveByCode()
- push()