| @@ 157-163 (lines=7) @@ | ||
| 154 | } |
|
| 155 | ||
| 156 | $return = true; |
|
| 157 | if (method_exists($this, 'beforeInvoke')) { |
|
| 158 | $return = $this->beforeInvoke(); |
|
| 159 | if ($return !== true && $return !== false) { |
|
| 160 | // TODO: |
|
| 161 | throw new Ajde_Exception(sprintf('beforeInvoke() must return either TRUE or FALSE')); |
|
| 162 | } |
|
| 163 | } |
|
| 164 | if ($return === true) { |
|
| 165 | $return = $this->$invokeFunction(); |
|
| 166 | if (method_exists($this, 'afterInvoke')) { |
|
| @@ 201-207 (lines=7) @@ | ||
| 198 | public function render() |
|
| 199 | { |
|
| 200 | $return = true; |
|
| 201 | if (method_exists($this, 'beforeRender')) { |
|
| 202 | $return = $this->beforeRender(); |
|
| 203 | if ($return !== true && $return !== false) { |
|
| 204 | // TODO: |
|
| 205 | throw new Ajde_Exception(sprintf('beforeRender() must return either TRUE or FALSE')); |
|
| 206 | } |
|
| 207 | } |
|
| 208 | if ($return === true) { |
|
| 209 | return $this->getView()->getContents(); |
|
| 210 | } |
|