aboutsummaryrefslogtreecommitdiff
path: root/app/routes/Discovery.php
blob: c83f524125e1130aa1e8cc0ab0837760d9016a35 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<?php
namespace RESTAPI\Routes;

/**
 * @author     Jan-Hendrik Willms <tleilax+studip@gmail.com>
 * @author     <mlunzena@uos.de>
 * @license    GPL 2 or later
 * @deprecated Since Stud.IP 5.0. Will be removed in Stud.IP 6.0.
 */
class Discovery extends \RESTAPI\RouteMap
{
    /**
     * Schnittstellenbeschreibung
     *
     * @get /discovery
     */
    public function getDiscovery()
    {
        $routes = $this->router->getRoutes(true);
        foreach ($routes as $uri_template => $methods) {
            foreach ($methods as $method => $route) {
                $routes[$uri_template][$method] = $route['description'];
            }
        }
        return $routes;
    }
}