Anonymous
public php v1 · immutable<?phpclass Template { protected $data; protected $path; public function __construct($path,$absolute=false) { if($absolute) $this->path = $path; else $this->path = realpath($_SERVER['DOCUMENT_ROOT']."/".$path); } public function call($file) { extract($this->data,EXTR_REFS|EXTR_OVERWRITE); include($file); } public function __get($offset) { return $this->data[$offset]; } public function __set($offset,$value) { $this->data[$offset] = $value; }}?>