|
@@ 265-275 (lines=11) @@
|
| 262 |
|
* @return array|bool |
| 263 |
|
* @throws \Exception |
| 264 |
|
*/ |
| 265 |
|
public function isClosureAndTemplate($callback) |
| 266 |
|
{ |
| 267 |
|
if (is_array($cls = $this->isClosure($callback))) { |
| 268 |
|
if (is_array($this->request['params']) && isset($this->request['params']['template']) && is_array($tpl = $this->isTemplate($this->request['params']['template']))) { |
| 269 |
|
return array_merge(array_merge($cls, $tpl), [ |
| 270 |
|
'dispatcher' => $this->dispatcher['isClosureAndTemplate'] |
| 271 |
|
]); |
| 272 |
|
} |
| 273 |
|
return $cls; |
| 274 |
|
} |
| 275 |
|
return false; |
| 276 |
|
} |
| 277 |
|
|
| 278 |
|
/** |
|
@@ 283-293 (lines=11) @@
|
| 280 |
|
* @return array|bool |
| 281 |
|
* @throws \Exception |
| 282 |
|
*/ |
| 283 |
|
public function isControllerAndTemplate($callback) |
| 284 |
|
{ |
| 285 |
|
if (is_array($ctrl = $this->isController($callback))) { |
| 286 |
|
if (is_array($this->request['params']) && isset($this->request['params']['template']) && is_array($tpl = $this->isTemplate($this->request['params']['template']))) { |
| 287 |
|
return array_merge(array_merge($ctrl, $tpl), [ |
| 288 |
|
'dispatcher' => $this->dispatcher['isControllerAndTemplate'] |
| 289 |
|
]); |
| 290 |
|
} |
| 291 |
|
return $ctrl; |
| 292 |
|
} |
| 293 |
|
return false; |
| 294 |
|
} |
| 295 |
|
|
| 296 |
|
|