title: What pattern or principle to use, in order to simplify generation of content that is based on lot of parameters?
body: <p>In a situation, where you need to generate a bunch of <code>&lt;title&gt;</code>, <code>&lt;meta name="description"&gt;</code> and <code>&lt;h1&gt;</code> tag contents, based on many query search parameters for thousands of pages. What principle or pattern is best fit in a situation like that?</p>
  
  <p>For example:</p>
  
  <p>You will get some array with lot's of query parameters, like the type of some object, it's features, location and many more. Based on the parameters, you need to generate, translate and render, different content in tags. What to do to avoid too many if statements and switch cases.</p>
  
  <p>I am aware that I could replace conditional with polymorphism, but still, when I get all those parameters, I need to somehow check for all possibilities and determine context what I will use. Then I am faced with a bunch of if statements, checking is some value set, what value does it have etc. Too many condition checking. Basically, that array I get is my huge problem, because I have to check every value if it exists or not. Unfortunately that params that come in an array shape, can't be turned to the class. So I have to stick with an array.</p>
  
  <p><strong>EDIT:</strong> I could take my array and map it to object representation of it, is it a better approach? How can I make most of it?</p>
  
  <p>Thanks.</p>