|
@@ 273-280 (lines=8) @@
|
| 270 |
|
// Search in core view helpers first |
| 271 |
|
$corePlugin = 'Faulancer\Plugin\\' . ucfirst($name); |
| 272 |
|
|
| 273 |
|
if (class_exists($corePlugin)) { |
| 274 |
|
|
| 275 |
|
$class = new $corePlugin; |
| 276 |
|
array_unshift($arguments, $this); |
| 277 |
|
|
| 278 |
|
return call_user_func_array($class, $arguments); |
| 279 |
|
|
| 280 |
|
} |
| 281 |
|
|
| 282 |
|
// No core implementations found; search in custom view helpers |
| 283 |
|
|
|
@@ 290-297 (lines=8) @@
|
| 287 |
|
|
| 288 |
|
$customPlugin = $namespace . '\Plugin\\' . ucfirst($name); |
| 289 |
|
|
| 290 |
|
if (class_exists($customPlugin)) { |
| 291 |
|
|
| 292 |
|
$class = new $customPlugin; |
| 293 |
|
array_unshift($arguments, $this); |
| 294 |
|
|
| 295 |
|
return call_user_func_array($class, $arguments); |
| 296 |
|
|
| 297 |
|
} |
| 298 |
|
|
| 299 |
|
throw new PluginException('No plugin for "' . $name . '" found.'); |
| 300 |
|
} |