| @@ 3880-3893 (lines=14) @@ | ||
| 3877 | /** |
|
| 3878 | * This is an open block handler, for the <% debug %> utility tag |
|
| 3879 | */ |
|
| 3880 | function OpenBlock_Handle_Debug(&$res) { |
|
| 3881 | if ($res['ArgumentCount'] == 0) return '$scope->debug();'; |
|
| 3882 | else if ($res['ArgumentCount'] == 1) { |
|
| 3883 | $arg = $res['Arguments'][0]; |
|
| 3884 | ||
| 3885 | if ($arg['ArgumentMode'] == 'string') return 'Debug::show('.$arg['php'].');'; |
|
| 3886 | ||
| 3887 | $php = ($arg['ArgumentMode'] == 'default') ? $arg['lookup_php'] : $arg['php']; |
|
| 3888 | return '$val .= Debug::show('.str_replace('FINALGET!', 'cachedCall', $php).');'; |
|
| 3889 | } |
|
| 3890 | else { |
|
| 3891 | throw new SSTemplateParseException('Debug takes 0 or 1 argument only.', $this); |
|
| 3892 | } |
|
| 3893 | } |
|
| 3894 | ||
| 3895 | /** |
|
| 3896 | * This is an open block handler, for the <% base_tag %> tag |
|
| @@ 1003-1016 (lines=14) @@ | ||
| 1000 | /** |
|
| 1001 | * This is an open block handler, for the <% debug %> utility tag |
|
| 1002 | */ |
|
| 1003 | function OpenBlock_Handle_Debug(&$res) { |
|
| 1004 | if ($res['ArgumentCount'] == 0) return '$scope->debug();'; |
|
| 1005 | else if ($res['ArgumentCount'] == 1) { |
|
| 1006 | $arg = $res['Arguments'][0]; |
|
| 1007 | ||
| 1008 | if ($arg['ArgumentMode'] == 'string') return 'Debug::show('.$arg['php'].');'; |
|
| 1009 | ||
| 1010 | $php = ($arg['ArgumentMode'] == 'default') ? $arg['lookup_php'] : $arg['php']; |
|
| 1011 | return '$val .= Debug::show('.str_replace('FINALGET!', 'cachedCall', $php).');'; |
|
| 1012 | } |
|
| 1013 | else { |
|
| 1014 | throw new SSTemplateParseException('Debug takes 0 or 1 argument only.', $this); |
|
| 1015 | } |
|
| 1016 | } |
|
| 1017 | ||
| 1018 | /** |
|
| 1019 | * This is an open block handler, for the <% base_tag %> tag |
|