EpubDocument
in package
FinalYes
One (X)HTML content document from an EPUB spine.
Replaces the EpubHtml model previously supplied by kiwilan/php-ebook.
Tags
Table of Contents
Properties
Methods
- __construct() : mixed
- getBody() : string
- The inner markup of the document's `<body>` element.
- getContent() : string
- The raw, unmodified document markup.
- getFilename() : string
- Entry path of this document inside the archive.
Properties
$body
private
string|null
$body
= null
$content
private
string
$content
$filename
private
string
$filename
Methods
__construct()
public
__construct(string $filename, string $content) : mixed
Parameters
- $filename : string
-
Entry path inside the archive
- $content : string
-
Raw document markup
getBody()
The inner markup of the document's `<body>` element.
public
getBody() : string
Falls back to the whole document when no <body> is present, which is
what fragments produced by some authoring tools look like.
Return values
string —Body markup, empty string when the document is empty
getContent()
The raw, unmodified document markup.
public
getContent() : string
Return values
stringgetFilename()
Entry path of this document inside the archive.
public
getFilename() : string