SproutCMS

This is the code documentation for the SproutCMS project

Page options:

Inherited members

class DocImport

Abstract class with additional stuff for the document importer system

The document importer loads docuemnts and returns XML files
These files can then be processed by other parts of the CMS.
The term "xmldoc" is referring to the intermediate XML file produced by the
import libraries

Functions

NameVisibilityDescription
getHeadingsTreepublic (static)For a given XML document, return a tree of headings
getHtmlpublic (static)For a given XML doc file, return the HTML version.
getResourcespublic (static)For a given XML doc file, return an array of resources, in name => data format.
instancepublic (static)Return a `DocImport` object instance for converting a file with a given original name
loadpublicThe main load function for a document.

public getHeadingsTree

Treenode DocImport::getHeadingsTree ( string $filename , int $max_depth [, bool $include_body ] );

For a given XML document, return a tree of headings

Any heading level past the max_depth option is treated like body text.

public getHtml

string DocImport::getHtml ( string $filename , array $images , array $headings );

For a given XML doc file, return the HTML version.

public getResources

array DocImport::getResources ( string $filename );

For a given XML doc file, return an array of resources, in name => data format.

public instance

unknown DocImport::instance ( mixed $orig_filename );

Return a `DocImport` object instance for converting a file with a given original name
Throws an exception on error

public load

string|DOMDocument $DocImport->load ( string $filename );

The main load function for a document.
Throw an exception on error.