| @@ 3725-3737 (lines=13) @@ | ||
| 3722 | } |
|
| 3723 | } |
|
| 3724 | ||
| 3725 | function ClosedBlock__finalise(&$res) { |
|
| 3726 | $blockname = $res['BlockName']['text']; |
|
| 3727 | ||
| 3728 | $method = 'ClosedBlock_Handle_'.$blockname; |
|
| 3729 | if (method_exists($this, $method)) { |
|
| 3730 | $res['php'] = $this->$method($res); |
|
| 3731 | } else if (isset($this->closedBlocks[$blockname])) { |
|
| 3732 | $res['php'] = call_user_func($this->closedBlocks[$blockname], $res); |
|
| 3733 | } else { |
|
| 3734 | throw new SSTemplateParseException('Unknown closed block "'.$blockname.'" encountered. Perhaps you are ' . |
|
| 3735 | 'not supposed to close this block, or have mis-spelled it?', $this); |
|
| 3736 | } |
|
| 3737 | } |
|
| 3738 | ||
| 3739 | /** |
|
| 3740 | * This is an example of a block handler function. This one handles the loop tag. |
|
| @@ 3866-3878 (lines=13) @@ | ||
| 3863 | } |
|
| 3864 | } |
|
| 3865 | ||
| 3866 | function OpenBlock__finalise(&$res) { |
|
| 3867 | $blockname = $res['BlockName']['text']; |
|
| 3868 | ||
| 3869 | $method = 'OpenBlock_Handle_'.$blockname; |
|
| 3870 | if (method_exists($this, $method)) { |
|
| 3871 | $res['php'] = $this->$method($res); |
|
| 3872 | } elseif (isset($this->openBlocks[$blockname])) { |
|
| 3873 | $res['php'] = call_user_func($this->openBlocks[$blockname], $res); |
|
| 3874 | } else { |
|
| 3875 | throw new SSTemplateParseException('Unknown open block "'.$blockname.'" encountered. Perhaps you missed ' . |
|
| 3876 | ' the closing tag or have mis-spelled it?', $this); |
|
| 3877 | } |
|
| 3878 | } |
|
| 3879 | ||
| 3880 | /** |
|
| 3881 | * This is an open block handler, for the <% debug %> utility tag |
|
| @@ 894-906 (lines=13) @@ | ||
| 891 | } |
|
| 892 | } |
|
| 893 | ||
| 894 | function ClosedBlock__finalise(&$res) { |
|
| 895 | $blockname = $res['BlockName']['text']; |
|
| 896 | ||
| 897 | $method = 'ClosedBlock_Handle_'.$blockname; |
|
| 898 | if (method_exists($this, $method)) { |
|
| 899 | $res['php'] = $this->$method($res); |
|
| 900 | } else if (isset($this->closedBlocks[$blockname])) { |
|
| 901 | $res['php'] = call_user_func($this->closedBlocks[$blockname], $res); |
|
| 902 | } else { |
|
| 903 | throw new SSTemplateParseException('Unknown closed block "'.$blockname.'" encountered. Perhaps you are ' . |
|
| 904 | 'not supposed to close this block, or have mis-spelled it?', $this); |
|
| 905 | } |
|
| 906 | } |
|
| 907 | ||
| 908 | /** |
|
| 909 | * This is an example of a block handler function. This one handles the loop tag. |
|
| @@ 978-990 (lines=13) @@ | ||
| 975 | } |
|
| 976 | } |
|
| 977 | ||
| 978 | function OpenBlock__finalise(&$res) { |
|
| 979 | $blockname = $res['BlockName']['text']; |
|
| 980 | ||
| 981 | $method = 'OpenBlock_Handle_'.$blockname; |
|
| 982 | if (method_exists($this, $method)) { |
|
| 983 | $res['php'] = $this->$method($res); |
|
| 984 | } elseif (isset($this->openBlocks[$blockname])) { |
|
| 985 | $res['php'] = call_user_func($this->openBlocks[$blockname], $res); |
|
| 986 | } else { |
|
| 987 | throw new SSTemplateParseException('Unknown open block "'.$blockname.'" encountered. Perhaps you missed ' . |
|
| 988 | ' the closing tag or have mis-spelled it?', $this); |
|
| 989 | } |
|
| 990 | } |
|
| 991 | ||
| 992 | /** |
|
| 993 | * This is an open block handler, for the <% debug %> utility tag |
|