From 3c3f573f3df40067576db0f4cafb87b21d85f3a3 Mon Sep 17 00:00:00 2001 From: Nicolas Boisselier Date: Thu, 14 Dec 2017 06:46:56 +0000 Subject: [PATCH] lib/php/out.php --- lib/php/out.php | 42 +----------------------------------------- lib/php/out/center.php | 10 ++++++++++ lib/php/out/div.php | 11 +++++++++++ lib/php/out/table.php | 11 +++++++++++ 4 files changed, 33 insertions(+), 41 deletions(-) create mode 100644 lib/php/out/center.php create mode 100644 lib/php/out/div.php create mode 100644 lib/php/out/table.php diff --git a/lib/php/out.php b/lib/php/out.php index 5f4c9143..35ae70f9 100644 --- a/lib/php/out.php +++ b/lib/php/out.php @@ -19,48 +19,8 @@ Class Out extends Nb { # [ - 'is_html' => true, - 'enclose' => array("
".NB_EOL,"
".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("
".NB_EOL,"
".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("".NB_EOL,"
".NB_EOL), - 'tag_enclose' => 'tr class="row"', - 'tag_head' => 'th', - 'tag' => 'td', - 'row' => 'out_tag', - 'head' => 'out_tag_head', - ], - - 'xml' => [ - 'enclose' => array(''.NB_EOL."".NB_EOL,"".NB_EOL), - 'eol' => self::p('eol',NB_EOL), - 'row' => function (&$o,&$row) { - echo ($o['eol'] ? ' ' : '')."".$o['eol']; - foreach ($row as $k => $v) { - echo ($o['eol'] ? ' ' : '')."<$k>".$o['eol']; - } - echo ($o['eol'] ? ' ' : '')."".$o['eol']; - }, - ], ]; diff --git a/lib/php/out/center.php b/lib/php/out/center.php new file mode 100644 index 00000000..96da517d --- /dev/null +++ b/lib/php/out/center.php @@ -0,0 +1,10 @@ + true, + 'enclose' => ["
".NB_EOL,"
".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 index 00000000..99268dac --- /dev/null +++ b/lib/php/out/div.php @@ -0,0 +1,11 @@ + true, + 'enclose' => ["
".NB_EOL,"
".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 index 00000000..9b562d00 --- /dev/null +++ b/lib/php/out/table.php @@ -0,0 +1,11 @@ + true, + 'enclose' => array("".NB_EOL,"
".NB_EOL), + 'tag_enclose' => 'tr class="row"', + 'tag_head' => 'th', + 'tag' => 'td', + 'row' => 'out_tag', + 'head' => 'out_tag_head', +]; +?> -- 2.47.3