<?php class Template { public $data = array(); public function addData($data) { $this->data[] = $data; } } ?>