/** * @param array $template_options { * @type string $_layout_template_file * @type string $_begin_template_file * @type string $_input_template_file * @type string $_subsection_template_file * @type string $_end_template_file * @type array $_template_args * } */ public function __construct($template_options = array()) { // loop thru incoming options foreach ($template_options as $key => $value) { // add underscore to $key to match property names $_key = '_' . $key; if (property_exists($this, $_key)) { $this->{$_key} = $value; } } parent::__construct(); }