Skip to content

Commit 8783679

Browse files
authored
Merge pull request #54303 from nextcloud/jtr-oc-appframework-app-cleanup
2 parents 7328754 + 67c14b0 commit 8783679

File tree

1 file changed

+6
-23
lines changed

1 file changed

+6
-23
lines changed

lib/private/AppFramework/App.php

Lines changed: 6 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ public static function getAppIdForClass(string $className, string $topNamespace
7171
return null;
7272
}
7373

74-
7574
/**
7675
* Shortcut for calling a controller method and printing the result
7776
*
@@ -82,7 +81,12 @@ public static function getAppIdForClass(string $className, string $topNamespace
8281
* @param array $urlParams list of URL parameters (optional)
8382
* @throws HintException
8483
*/
85-
public static function main(string $controllerName, string $methodName, DIContainer $container, ?array $urlParams = null) {
84+
public static function main(
85+
string $controllerName,
86+
string $methodName,
87+
DIContainer $container,
88+
?array $urlParams = null,
89+
): void {
8690
/** @var IProfiler $profiler */
8791
$profiler = $container->get(IProfiler::class);
8892
$eventLogger = $container->get(IEventLogger::class);
@@ -210,25 +214,4 @@ public static function main(string $controllerName, string $methodName, DIContai
210214
}
211215
}
212216
}
213-
214-
/**
215-
* Shortcut for calling a controller method and printing the result.
216-
* Similar to App:main except that no headers will be sent.
217-
*
218-
* @param string $controllerName the name of the controller under which it is
219-
* stored in the DI container
220-
* @param string $methodName the method that you want to call
221-
* @param array $urlParams an array with variables extracted from the routes
222-
* @param DIContainer $container an instance of a pimple container.
223-
*/
224-
public static function part(string $controllerName, string $methodName, array $urlParams,
225-
DIContainer $container) {
226-
$container['urlParams'] = $urlParams;
227-
$controller = $container[$controllerName];
228-
229-
$dispatcher = $container['Dispatcher'];
230-
231-
[, , $output] = $dispatcher->dispatch($controller, $methodName);
232-
return $output;
233-
}
234217
}

0 commit comments

Comments
 (0)