PHP Class MOBIFile, phpMobi

File modified by Dawson for use in eBook Creator Added pagebreaks and a setting to remove table of contents.
Inheritance: extends ContentProvider
Mostrar archivo Open project: raiju/phpMobi Class Usage Examples

Public Methods

Method Description
appendChapterTitle ( string $title ) Append a chapter title (H2)
appendImage ( resource $img ) Append an image.
appendPageBreak ( )
appendParagraph ( string $text ) Append a paragraph of text to the file.
appendSectionTitle ( string $title ) Append a section title (H3)
get ( $key ) Get the file's settings.
getImages ( ) Get the file records of the images
getMetaData ( ) Get the metadata
getTextData ( ) Get the text data (the "html" code)
set ( $key, $value ) Change the file's settings. For example set("author", "John Doe") or set("title", "The adventures of John Doe").

Private Methods

Method Description
addFilepos ( $str, $name )
addGuide ( $str )
addTOC ( $str, $entries ) Generate a TOC
addText ( $str ) : array($string, Generate the body's text and the chapter entries
filepos ( $position )
resolveFilepos ( $str, $name )

Method Details

appendChapterTitle() public method

Append a chapter title (H2)
public appendChapterTitle ( string $title )
$title string The title to insert.

appendImage() public method

Append an image.
public appendImage ( resource $img )
$img resource An image file (for example, created by `imagecreate`)

appendPageBreak() public method

public appendPageBreak ( )

appendParagraph() public method

Append a paragraph of text to the file.
public appendParagraph ( string $text )
$text string The text to insert.

appendSectionTitle() public method

Append a section title (H3)
public appendSectionTitle ( string $title )
$title string The title to insert.

get() public method

Get the file's settings.
public get ( $key )

getImages() public method

Get the file records of the images
public getImages ( )

getMetaData() public method

Get the metadata
public getMetaData ( )

getTextData() public method

Get the text data (the "html" code)
public getTextData ( )

set() public method

Change the file's settings. For example set("author", "John Doe") or set("title", "The adventures of John Doe").
public set ( $key, $value )
$key Key of the setting to insert.