public function loadFromFile($_filename = null)
{
if ($_filename === null) {
$_filename = $this->filename;
} else {
$this->filename = $_filename;
}
if (!file_exists($_filename)) {
throw new \Exception('File "' . $_filename . '" not found.');
}
if (!($content = file_get_contents($this->filename))) {
throw new \Exception('Could not read file content (' . $_filename . ').');
}
$this->loadFromString($content);
return $this;
}