public function __construct($server_id, $name = null, $filename = null, $type = null, $id = null) { if (DEBUG_ENABLED && (($fargs = func_get_args()) || ($fargs = 'NOARGS'))) { debug_log('Entered (%%)', 5, 0, __FILE__, __LINE__, __METHOD__, $fargs); } $this->server_id = $server_id; $this->name = $name; $this->type = $type; $this->filename = $filename; $this->readtime = time(); $this->id = $id; # If there is no filename, then this template is a default template. if (is_null($filename)) { return; } # If we have a filename, parse the template file and build the object. $objXML = new xml2array(); $xmldata = $objXML->parseXML(file_get_contents($filename), $filename); $this->storeTemplate($xmldata); }