2013-08-17 05:16:48 -04:00
|
|
|
<?php
|
2024-05-23 03:26:56 -04:00
|
|
|
|
2013-08-17 05:16:48 -04:00
|
|
|
/**
|
2024-05-23 03:26:56 -04:00
|
|
|
* SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
|
|
|
|
|
* SPDX-FileCopyrightText: 2016 ownCloud, Inc.
|
|
|
|
|
* SPDX-License-Identifier: AGPL-3.0-only
|
2013-08-17 05:16:48 -04:00
|
|
|
*/
|
2016-04-22 09:28:09 -04:00
|
|
|
namespace OC\AppFramework\Routing;
|
2013-08-17 05:16:48 -04:00
|
|
|
|
2019-11-22 14:52:10 -05:00
|
|
|
use OC\AppFramework\App;
|
|
|
|
|
use OC\AppFramework\DependencyInjection\DIContainer;
|
2013-08-17 05:16:48 -04:00
|
|
|
|
|
|
|
|
class RouteActionHandler {
|
|
|
|
|
private $controllerName;
|
|
|
|
|
private $actionName;
|
|
|
|
|
private $container;
|
|
|
|
|
|
2014-02-06 10:30:58 -05:00
|
|
|
/**
|
|
|
|
|
* @param string $controllerName
|
|
|
|
|
* @param string $actionName
|
|
|
|
|
*/
|
2013-08-17 05:16:48 -04:00
|
|
|
public function __construct(DIContainer $container, $controllerName, $actionName) {
|
|
|
|
|
$this->controllerName = $controllerName;
|
|
|
|
|
$this->actionName = $actionName;
|
|
|
|
|
$this->container = $container;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function __invoke($params) {
|
2013-11-25 05:36:33 -05:00
|
|
|
App::main($this->controllerName, $this->actionName, $this->container, $params);
|
2013-08-17 05:16:48 -04:00
|
|
|
}
|
|
|
|
|
}
|