public function write($p_templateFileName = null)
{
// sets the output file to write to
if (!is_null($p_templateFileName)) {
$output = $this->m_templatePathDirectory . '/' . $p_templateFileName;
} else {
$output = $this->m_templatePathDirectory . '/' . $this->m_templateFileName;
}
if (file_exists($output) && !is_writable($output) || !is_writable($this->m_templatePathDirectory)) {
return new PEAR_Error('Could not write template file');
}
if (@file_put_contents($output, $this->m_templateContent) == false) {
return new PEAR_Error('Could not write template file');
}
return true;
}