header=$header; $this->body=$body; $this->footer=$footer; } function Stitch($dir, $file) { ob_start(); include($dir.$file); $output = ob_get_contents(); ob_end_clean(); return $output; } function Replace($replace, $replacer, $template) { $output = str_replace($replace, $replacer, $template); return $output; } public function __toString() { return (string)$this->Replace; } } ?>