Archive - 21.05.2015

A great feature of PHP – Cookbook for context implementation

This article covers technical details of PHP driven configuration described in a previous article. There are a lot of stones under the water that can drive you crazy when you work with PHP templating engine. I will tell you how to work around some of them. We’ll discuss how to:

  1. Implement script inclusion methods
  2. Prevent vision of context’s private members
  3. Implement graceful error handling
  4. Implement state stack for nested scripts inclusion
  5. Include scripts by relative path
  6. Output JSON arrays/objects in for-loops
  7. Prevent security issues

Read More