- if (is_array($item['page_callback'])) {
- require_once (str_replace('_', DIRECTORY_SEPARATOR, $item['page_callback'][0]) . '.php');
- $result = call_user_func($item['page_callback']);
+ // WISHLIST: Refactor this. Instead of pattern-matching on page_callback, lookup
+ // page_callback via Civi\Core\Resolver and check the implemented interfaces. This
+ // would require rethinking the default constructor.
+ if (is_array($item['page_callback']) || strpos($item['page_callback'], ':')) {
+ $result = call_user_func(Civi\Core\Resolver::singleton()->get($item['page_callback']));