コード例 #1
0
ファイル: box.php プロジェクト: nshong/processmaker
function &create_pdf_box(&$root, &$pipeline)
{
    switch ($root->node_type()) {
        case XML_DOCUMENT_NODE:
            // TODO: some magic from traverse_dom_tree
            $box =& create_document_box($root, $pipeline);
            return $box;
        case XML_ELEMENT_NODE:
            $box =& create_node_box($root, $pipeline);
            return $box;
        case XML_TEXT_NODE:
            $box =& create_text_box($root, $pipeline);
            return $box;
        default:
            die("Unsupported node type:" . $root->node_type());
    }
}
コード例 #2
0
ファイル: box.php プロジェクト: sharmarakesh/EduSec2.0.0
function &create_pdf_box(&$root, &$pipeline)
{
    // we must to be sure that first element is object
    if (is_object($root)) {
        switch ($root->node_type()) {
            case XML_DOCUMENT_NODE:
                // TODO: some magic from traverse_dom_tree
                $box =& create_document_box($root, $pipeline);
                return $box;
            case XML_ELEMENT_NODE:
                $box =& create_node_box($root, $pipeline);
                return $box;
            case XML_TEXT_NODE:
                $box =& create_text_box($root, $pipeline);
                return $box;
            default:
                die("unsupported node type:" . $root->node_type());
        }
    } else {
        die("node object expected, none object resived (" . __FILE__ . ":" . __LINE__ . ")");
    }
}
コード例 #3
0
ファイル: box.php プロジェクト: emildev35/processmaker
function &create_pdf_box(&$root, &$pipeline)
{
    if ($root != '') {
        $valueNodeType = $root->node_type();
    } else {
        throw new Exception("ID_OUTPUT_NOT_GENERATE", 1);
    }
    switch ($valueNodeType) {
        case XML_DOCUMENT_NODE:
            // TODO: some magic from traverse_dom_tree
            $box =& create_document_box($root, $pipeline);
            return $box;
        case XML_ELEMENT_NODE:
            $box =& create_node_box($root, $pipeline);
            return $box;
        case XML_TEXT_NODE:
            $box =& create_text_box($root, $pipeline);
            return $box;
        default:
            die("Unsupported node type:" . $root->node_type());
    }
}