projects
/
Pman.Core
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
bfc8c63
)
SimpleExcel.php
author
Alan Knowles
<alan@roojs.com>
Tue, 18 Oct 2016 04:46:06 +0000
(12:46 +0800)
committer
Alan Knowles
<alan@roojs.com>
Tue, 18 Oct 2016 04:46:06 +0000
(12:46 +0800)
SimpleExcel.php
patch
|
blob
|
history
diff --git
a/SimpleExcel.php
b/SimpleExcel.php
index
9213290
..
c3cc062
100644
(file)
--- a/
SimpleExcel.php
+++ b/
SimpleExcel.php
@@
-254,8
+254,13
@@
class Pman_Core_SimpleExcel extends Pman
continue;
}
if (isset($col_cfg['renderer'])) {
continue;
}
if (isset($col_cfg['renderer'])) {
+
+ if (is_a($col_cfg['renderer'], 'Closure')) {
+ $col_cfg['renderer']->call($cl[$col_cfg['dataIndex']], $worksheet, $r+1, $c, $cl);
+ } else {
// not sure if row is correct here...!!!?
// not sure if row is correct here...!!!?
- call_user_func($col_cfg['renderer'], $cl[$col_cfg['dataIndex']], $worksheet, $r+1, $c, $cl);
+ call_user_func($col_cfg['renderer'], $cl[$col_cfg['dataIndex']], $worksheet, $r+1, $c, $cl);
+ }
}
// echo "<PRE>WRITE: ". htmlspecialchars(print_r(array($r+1, $c, $cl[$col_cfg['dataIndex']]), true));
}
// echo "<PRE>WRITE: ". htmlspecialchars(print_r(array($r+1, $c, $cl[$col_cfg['dataIndex']]), true));