/**
*
* @param string $title
* @param string $cssFileName
*
* @return string
*/
function finalizeEPub3($title = "Table of Contents", $cssFileName = null)
{
$end = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" . "<html xmlns=\"http://www.w3.org/1999/xhtml\"\n" . " xmlns:epub=\"http://www.idpf.org/2007/ops\"\n" . " xml:lang=\"" . $this->languageCode . "\" lang=\"" . $this->languageCode . "\" dir=\"" . $this->writingDirection . "\">\n" . "\t<head>\n" . "\t\t<title>" . $this->docTitle . "</title>\n" . "\t\t<meta http-equiv=\"default-style\" content=\"text/html; charset=utf-8\"/>\n";
if ($this->parentBook !== null) {
$end .= $this->parentBook->getViewportMetaLine();
}
if ($cssFileName !== null) {
$end .= "\t\t<link rel=\"stylesheet\" href=\"" . $cssFileName . "\" type=\"text/css\"/>\n";
}
$end .= "\t</head>\n" . "\t<body epub:type=\"frontmatter toc\">\n" . "\t\t<header>\n" . "\t\t\t<h1>" . $title . "</h1>\n" . "\t\t</header>\n" . $this->navMap->finalizeEPub3() . $this->finalizeEPub3Landmarks() . "\t</body>\n" . "</html>\n";
return $end;
}