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