Skip to content

Commit f5df45c

Browse files
committed
Added @results support for sqlP macros
1 parent d508827 commit f5df45c

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

system/sqlp/lexer.php

+10
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,16 @@ function ($matches) {
210210
},
211211
$macro);
212212

213+
//@result
214+
//replace result variables
215+
$macro =
216+
preg_replace_callback(
217+
'/@result\.([\w\.]+)/',
218+
function ($matches) {
219+
return \Vvveb\dotToArrayKey('$results.' . $matches[1]);
220+
},
221+
$macro);
222+
213223
//replace macro template placeholders %placeholder
214224
$macro = preg_replace_callback(
215225
'@\%(\w+)@',

0 commit comments

Comments
 (0)