rss::output PHP Method

output() public method

public output ( )
    public function output()
    {
        // dump xml tree
        return $this->document->saveXML();
    }

Usage Example

Example #1
0
    if (!empty($v['cache']) && $v['cache'] == 1) {
        $arrInfoList[$k] = array('name' => $v['name']);
        if (is_file('../data/' . $k . '/' . $k . '_type.php')) {
            @(include '../data/' . $k . '/' . $k . '_type.php');
        }
        if (!empty($arrMType)) {
            foreach ($arrMType as $key => $val) {
                if (empty($val['type_link'])) {
                    $arrInfoList[$k]['type'][] = array('type_id' => $val['type_id'], 'name' => $val['type_title']);
                }
            }
        } else {
            $objWebInit->tablename1 = $arrGPdoDB['db_tablepre'] . $k . '_type';
            $arrType = check::getAPI($k, "getTypeList", "");
            $strType = check::getAPIArray($arrType);
            $arrMType = check::getAPI($k, "formatTypeList", "0^{$strType}^0");
            if (!empty($arrMType)) {
                foreach ($arrMType as $key => $val) {
                    if (empty($val['type_link'])) {
                        $arrInfoList[$k]['type'][] = array('type_id' => $val['type_id'], 'name' => $val['type_title']);
                    }
                }
            }
        }
    }
}
// 输出到模板
$arrMOutput["smarty_assign"]['arrInfoList'] = $arrInfoList;
$arrMOutput["smarty_assign"]['MAIN'] = $arrGSmarty['main_dir'] . 'index.html';
$objWebInit->output($arrMOutput);