public static $types = null; public static function types() {
self::$types = array(
- 'csv' => array(
- 'enclose' => array("","\n"),
- 'eol' => "\n",
- 'sep' => (self::p('sep') ? self::p('sep') : "\t"),
- 'head' => 'out_csv_head',
- 'function' => 'out_csv',
- ),
'divs' => array(
+ 'is_html' => true,
'enclose' => array("<div class=\"rows\">".NB_EOL,"</div>".NB_EOL),
'tag_enclose' => 'div class="row"',
#'tag_head' => 'span',
'head' => 'out_tag_head',
),
'center' => array(
+ 'is_html' => true,
'enclose' => array("<center>".NB_EOL,"</center>".NB_EOL),
'tag_enclose' => 'div',
'tag' => 'label',
'head' => 'out_tag_head',
),
'table' => array(
+ 'is_html' => true,
'enclose' => array("<table class=\"rows\">".NB_EOL,"</table>".NB_EOL),
'tag_enclose' => 'tr class="row"',
'tag_head' => 'th',
'head' => 'out_tag_head',
),
'xml' => array(
- 'enclose' => array('<?xml version="1.0" encoding="utf-8"?>'.NB_EOL."<rows>".NB_EOL,"</rows>".NB_EOL),
+ 'enclose' => array('<?xml version="1.0" encoding="utf-8"?'.'>'.NB_EOL."<rows>".NB_EOL,"</rows>".NB_EOL),
'function' => 'out_xml',
),
+ 'csv' => array(
+ 'enclose' => array("","\n"),
+ 'eol' => "\n",
+ 'sep' => (self::p('sep') ? self::p('sep') : "\t"),
+ 'head' => 'out_csv_head',
+ 'function' => 'out_csv',
+ ),
'yaml' => array(
'enclose' => array("---\n",""),
'function' => 'out_yaml',
if ($count) self::end($conf);
}
+ public static function type($name,$key='') {
+ if (empty(self::$types[$name])) return null;
+ $type = self::$types[$name];
+ if ($key) return( (array_key_exists($key,$type)) ? $type[$key] : null );
+ return $type;
+ }
+
} Out::types() ; # < Class
/****************************************************************************/