Renders the template and writes the result to a file.
string $target:
public function renderTo($target) {
$fp = @fopen($target, 'wt');
if ($fp) {
fwrite($fp, $this
->render());
fclose($fp);
}
else {
$error = error_get_last();
throw new RuntimeException(sprintf('Could not write to %s: %s', $target, substr($error['message'], strpos($error['message'], ':') + 2)));
}
}