|
@@ 222-229 (lines=8) @@
|
| 219 |
|
// Search in core view helpers first |
| 220 |
|
$corePlugin = 'Faulancer\Plugin\\' . ucfirst($name); |
| 221 |
|
|
| 222 |
|
if (class_exists($corePlugin)) { |
| 223 |
|
|
| 224 |
|
$class = new $corePlugin; |
| 225 |
|
array_unshift($arguments, $this); |
| 226 |
|
|
| 227 |
|
return call_user_func_array($class, $arguments); |
| 228 |
|
|
| 229 |
|
} |
| 230 |
|
|
| 231 |
|
// No core implementations found; search in custom view helpers |
| 232 |
|
|
|
@@ 239-246 (lines=8) @@
|
| 236 |
|
|
| 237 |
|
$customPlugin = $namespace . '\Plugin\\' . ucfirst($name); |
| 238 |
|
|
| 239 |
|
if (class_exists($customPlugin)) { |
| 240 |
|
|
| 241 |
|
$class = new $customPlugin; |
| 242 |
|
array_unshift($arguments, $this); |
| 243 |
|
|
| 244 |
|
return call_user_func_array($class, $arguments); |
| 245 |
|
|
| 246 |
|
} |
| 247 |
|
|
| 248 |
|
throw new PluginException('No plugin for "' . $name . '" found.'); |
| 249 |
|
} |