Documentation

EpubDocument

FinalYes

One (X)HTML content document from an EPUB spine.

Replaces the EpubHtml model previously supplied by kiwilan/php-ebook.

Tags
since
3.4.0

Table of Contents

Properties

$body  : string|null
$content  : string
$filename  : string

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

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
string

getFilename()

Entry path of this document inside the archive.

public getFilename() : string
Return values
string
On this page

Search results