SproutCMS

This is the code documentation for the SproutCMS project

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

Extending this class

<?php
/**
* New class description goes here
* 
* @author Your Name, 2026-09-16
**/
class NewClassName extends DocImport {
    
    /**
    * For a given XML document, return a tree of headings
    * 
    * Any heading level past the max_depth option is treated like body text.
    **/
    public function getHeadingsTree (string $filename, int $max_depth, bool $include_body) {
        // Method code goes here
    }
    
    /**
    * For a given XML doc file, return the HTML version.
    **/
    public function getHtml (string $filename, array $images, array $headings) {
        // Method code goes here
    }
    
    /**
    * For a given XML doc file, return an array of resources, in name =&gt; data format.
    **/
    public function getResources (string $filename) {
        // Method code goes here
    }
    
    /**
    * Return a `DocImport` object instance for converting a file with a given original name
    * Throws an exception on error
    **/
    public function instance ($orig_filename) {
        // Method code goes here
    }
    
    /**
    * The main load function for a document.
    * Throw an exception on error.
    **/
    public function load (string $filename) {
        // Method code goes here
    }
    
}
?>