diff options
author | Josh <josh.t.richards@gmail.com> | 2025-08-06 17:10:45 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-08-06 17:10:45 -0400 |
commit | 67c14b0f1131f54b5b8b7fb24045f1c4e2e0371b (patch) | |
tree | 613895056a208d56c6c440a7e3aed60298720ab6 | |
parent | 3ba788853716f9c3df21627f6a9f9210bfda48b8 (diff) | |
download | nextcloud-server-jtr-oc-appframework-app-cleanup.tar.gz nextcloud-server-jtr-oc-appframework-app-cleanup.zip |
refactor(App): \OC\AppFramework\App clean-upjtr-oc-appframework-app-cleanup
Signed-off-by: Josh <josh.t.richards@gmail.com>
-rw-r--r-- | lib/private/AppFramework/App.php | 29 |
1 files changed, 6 insertions, 23 deletions
diff --git a/lib/private/AppFramework/App.php b/lib/private/AppFramework/App.php index 77135986d5f..838710e63d8 100644 --- a/lib/private/AppFramework/App.php +++ b/lib/private/AppFramework/App.php @@ -71,7 +71,6 @@ class App { return null; } - /** * Shortcut for calling a controller method and printing the result * @@ -82,7 +81,12 @@ class App { * @param array $urlParams list of URL parameters (optional) * @throws HintException */ - public static function main(string $controllerName, string $methodName, DIContainer $container, ?array $urlParams = null) { + public static function main( + string $controllerName, + string $methodName, + DIContainer $container, + ?array $urlParams = null, + ): void { /** @var IProfiler $profiler */ $profiler = $container->get(IProfiler::class); $eventLogger = $container->get(IEventLogger::class); @@ -211,25 +215,4 @@ class App { } } } - - /** - * Shortcut for calling a controller method and printing the result. - * Similar to App:main except that no headers will be sent. - * - * @param string $controllerName the name of the controller under which it is - * stored in the DI container - * @param string $methodName the method that you want to call - * @param array $urlParams an array with variables extracted from the routes - * @param DIContainer $container an instance of a pimple container. - */ - public static function part(string $controllerName, string $methodName, array $urlParams, - DIContainer $container) { - $container['urlParams'] = $urlParams; - $controller = $container[$controllerName]; - - $dispatcher = $container['Dispatcher']; - - [, , $output] = $dispatcher->dispatch($controller, $methodName); - return $output; - } } |