fzaninotto / Faker

Faker is a PHP library that generates fake data for you
MIT License
26.8k stars 3.57k forks source link

added protected method Generator::findFormatter #2013

Open gsouf opened 4 years ago

gsouf commented 4 years ago

Hi,

This PR adds a protected method Generator::findFormatter that can get a formatter without use of cache.

The reason I propose it is that we need to define custom way to find a formatter by overiding Generator::getFormater but we cannot do it efficiently as the method makes use of cache internally. We would like to be able to keep the native cache feature of the method and just overide the way the formatter callable is found.

In other words with this change then we will be able to overide the method findFormatter without messing with the cache implementation

Thanks