Blame view

sources/lib/private/appframework/routing/routeactionhandler.php 1.37 KB
03e52840d   Kload   Init
1
2
  <?php
  /**
31b7f2792   Kload   Upgrade to ownclo...
3
   * ownCloud - App Framework
03e52840d   Kload   Init
4
   *
31b7f2792   Kload   Upgrade to ownclo...
5
6
   * @author Thomas Müller
   * @copyright 2013 Thomas Müller thomas.mueller@tmit.eu
03e52840d   Kload   Init
7
8
9
10
11
12
13
14
15
16
17
18
19
   *
   * This library is free software; you can redistribute it and/or
   * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
   * License as published by the Free Software Foundation; either
   * version 3 of the License, or any later version.
   *
   * This library is distributed in the hope that it will be useful,
   * but WITHOUT ANY WARRANTY; without even the implied warranty of
   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   * GNU AFFERO GENERAL PUBLIC LICENSE for more details.
   *
   * You should have received a copy of the GNU Affero General Public
   * License along with this library.  If not, see <http://www.gnu.org/licenses/>.
31b7f2792   Kload   Upgrade to ownclo...
20
   *
03e52840d   Kload   Init
21
   */
31b7f2792   Kload   Upgrade to ownclo...
22
  namespace OC\AppFramework\routing;
03e52840d   Kload   Init
23

31b7f2792   Kload   Upgrade to ownclo...
24
25
  use \OC\AppFramework\App;
  use \OC\AppFramework\DependencyInjection\DIContainer;
03e52840d   Kload   Init
26

31b7f2792   Kload   Upgrade to ownclo...
27
28
29
30
  class RouteActionHandler {
  	private $controllerName;
  	private $actionName;
  	private $container;
03e52840d   Kload   Init
31

6d9380f96   Cédric Dupont   Update sources OC...
32
33
34
35
  	/**
  	 * @param string $controllerName
  	 * @param string $actionName
  	 */
31b7f2792   Kload   Upgrade to ownclo...
36
37
38
39
  	public function __construct(DIContainer $container, $controllerName, $actionName) {
  		$this->controllerName = $controllerName;
  		$this->actionName = $actionName;
  		$this->container = $container;
03e52840d   Kload   Init
40
  	}
31b7f2792   Kload   Upgrade to ownclo...
41
42
  	public function __invoke($params) {
  		App::main($this->controllerName, $this->actionName, $this->container, $params);
03e52840d   Kload   Init
43
44
  	}
  }