Basically I have no idea, what is the best way to collect/inject a bunch of data in an object which has clean code . let’s have some examples as below :
- we have an object to replace place holders with some variables, usually, we need to inject an array of pair key-value to this object. what is the standard way of collecting data for the object ??? do we need a global array and add or replace key-value data or need a JSON-YAML file? (how about changing placeholder values in different pages or controllers?) I really confuse some times what method is standards for these dynamic values which we don’t need to store it in DB. is any name for this kind of collecting data in PHP frameworks?
- we need some settings for an object, like API or bank gateway. how usually we inject it as we know it can be changed in different situations?