]> git.nbdom.net Git - nb.git/commitdiff
lib/php/out.php
authorNicolas Boisselier <nicolas.boisselier@gmail.com>
Thu, 14 Dec 2017 06:46:56 +0000 (06:46 +0000)
committerNicolas Boisselier <nicolas.boisselier@gmail.com>
Thu, 14 Dec 2017 06:46:56 +0000 (06:46 +0000)
lib/php/out.php
lib/php/out/center.php [new file with mode: 0644]
lib/php/out/div.php [new file with mode: 0644]
lib/php/out/table.php [new file with mode: 0644]

index 5f4c91431ef2cea2cfca5c60a68dc616aec2bf74..35ae70f982c887a98b7b5caf50a6058ed7fac197 100644 (file)
@@ -19,48 +19,8 @@ Class Out extends Nb {
 #<?php
 #if (!class_exists('out')) return;
 #<?php
-#return
-
-      'div' => [
-        'is_html' => true,
-        'enclose' => array("<div class=\"rows\">".NB_EOL,"</div>".NB_EOL),
-        'tag_enclose' => 'div class="row"',
-        'tag' => 'div',
-        'tag_key' => 'label',
-        'row' => 'out_tag',
-# NB 25.12.16         'head' => 'out_tag_head',
-      ],
-
-      'center' => [
-        'is_html' => true,
-        'enclose' => array("<center class=\"rows\">".NB_EOL,"</center>".NB_EOL),
-        'tag_enclose' => 'div class="row"',
-        'tag' => 'div',
-        'row' => 'out_tag',
-# NB 25.12.16         'head' => 'out_tag_head',
-      ],
+#return [
 
-      'table' => [
-        'is_html' => true,
-        'enclose' => array("<table class=\"rows widefat striped\">".NB_EOL,"</table>".NB_EOL),
-        'tag_enclose' => 'tr class="row"',
-        'tag_head' => 'th',
-        'tag' => 'td',
-        'row' => 'out_tag',
-        'head' => 'out_tag_head',
-      ],
-
-      'xml' => [
-        'enclose' => array('<?xml version="1.0" encoding="utf-8"?'.'>'.NB_EOL."<rows>".NB_EOL,"</rows>".NB_EOL),
-        'eol' => self::p('eol',NB_EOL),
-        'row' => function (&$o,&$row) {
-          echo ($o['eol'] ? '  ' : '')."<row>".$o['eol'];
-          foreach ($row as $k => $v) {
-            echo ($o['eol'] ? '    ' : '')."<$k><![CDATA[".self::scalar($v)."]]></$k>".$o['eol'];
-          }
-          echo ($o['eol'] ? '  ' : '')."</row>".$o['eol'];
-        },
-      ],
 
 
     ];
diff --git a/lib/php/out/center.php b/lib/php/out/center.php
new file mode 100644 (file)
index 0000000..96da517
--- /dev/null
@@ -0,0 +1,10 @@
+<?php
+return [
+  'is_html' => true,
+  'enclose' => ["<center class=\"rows\">".NB_EOL,"</center>".NB_EOL],
+  'tag_enclose' => 'div class="row"',
+  'tag' => 'div',
+  'row' => 'out_tag',
+# NB 25.12.16         'head' => 'out_tag_head',
+];
+?>
diff --git a/lib/php/out/div.php b/lib/php/out/div.php
new file mode 100644 (file)
index 0000000..99268da
--- /dev/null
@@ -0,0 +1,11 @@
+<?php
+return [
+  'is_html' => true,
+  'enclose' => ["<div class=\"rows\">".NB_EOL,"</div>".NB_EOL],
+  'tag_enclose' => 'div class="row"',
+  'tag' => 'div',
+  'tag_key' => 'label',
+  'row' => 'out_tag',
+# NB 25.12.16         'head' => 'out_tag_head',
+];
+?>
diff --git a/lib/php/out/table.php b/lib/php/out/table.php
new file mode 100644 (file)
index 0000000..9b562d0
--- /dev/null
@@ -0,0 +1,11 @@
+<?php
+return [
+  'is_html' => true,
+  'enclose' => array("<table class=\"rows widefat striped\">".NB_EOL,"</table>".NB_EOL),
+  'tag_enclose' => 'tr class="row"',
+  'tag_head' => 'th',
+  'tag' => 'td',
+  'row' => 'out_tag',
+  'head' => 'out_tag_head',
+];
+?>