ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ilRestServer Class Reference

Slim rest server. More...

+ Inheritance diagram for ilRestServer:
+ Collaboration diagram for ilRestServer:

Public Member Functions

 __construct ($container=[])
 ilRestServer constructor. More...
 
 init ()
 Init server / add handlers. More...
 
- Public Member Functions inherited from Slim\App
 __construct ($container=[])
 Create new application. More...
 
 getContainer ()
 Enable access to the DI container by consumers of $app. More...
 
 add ($callable)
 Add middleware. More...
 
 __call ($method, $args)
 Calling a non-existant method on App checks to see if there's an item in the container that is callable and if so, calls it. More...
 
 get ($pattern, $callable)
 Add GET route. More...
 
 post ($pattern, $callable)
 Add POST route. More...
 
 put ($pattern, $callable)
 Add PUT route. More...
 
 patch ($pattern, $callable)
 Add PATCH route. More...
 
 delete ($pattern, $callable)
 Add DELETE route. More...
 
 options ($pattern, $callable)
 Add OPTIONS route. More...
 
 any ($pattern, $callable)
 Add route for any HTTP method. More...
 
 map (array $methods, $pattern, $callable)
 Add route with multiple methods. More...
 
 redirect ($from, $to, $status=302)
 Add a route that sends an HTTP redirect. More...
 
 run ($silent=false)
 Run application. More...
 
 process (ServerRequestInterface $request, ResponseInterface $response)
 Process a request. More...
 
 respond (ResponseInterface $response)
 Send the response to the client. More...
 
 subRequest ( $method, $path, $query='', array $headers=[], array $cookies=[], $bodyContent='', ResponseInterface $response=null)
 Perform a sub-request from within an application route. More...
 

Additional Inherited Members

- Data Fields inherited from Slim\App
const VERSION = '3.11.0'
 
- Protected Member Functions inherited from Slim\App
 processInvalidMethod (ServerRequestInterface $request, ResponseInterface $response)
 Pull route info for a request with a bad method to decide whether to return a not-found error (default) or a bad-method error, then run the handler for that error, returning the resulting response. More...
 
 dispatchRouterAndPrepareRoute (ServerRequestInterface $request, RouterInterface $router)
 Dispatch the router to find the route. More...
 
 finalize (ResponseInterface $response)
 Finalize response. More...
 
 isEmptyResponse (ResponseInterface $response)
 Helper method, which returns true if the provided response must not output a body and false if the response could have a body. More...
 
 handleException (Exception $e, ServerRequestInterface $request, ResponseInterface $response)
 Call relevant handler from the Container if needed. More...
 
 handlePhpError (Throwable $e, ServerRequestInterface $request, ResponseInterface $response)
 Call relevant handler from the Container if needed. More...
 

Detailed Description

Slim rest server.

Author
Stefan Meyer smeye.nosp@m.r.il.nosp@m.ias@g.nosp@m.mx.d.nosp@m.e

Definition at line 11 of file class.ilRestServer.php.

Constructor & Destructor Documentation

◆ __construct()

ilRestServer::__construct (   $container = [])

ilRestServer constructor.

Parameters
array$container

Definition at line 17 of file class.ilRestServer.php.

References Slim\App\$container.

18  {
19  parent::__construct($container);
20  }
$container
Definition: App.php:62

Member Function Documentation

◆ init()

ilRestServer::init ( )

Init server / add handlers.

Definition at line 26 of file class.ilRestServer.php.

References array, and Slim\App\post().

27  {
28  $callback_obj = new ilRestFileStorage();
29 
30  $this->get('/fileStorage', array($callback_obj,'getFile'));
31  $this->post('/fileStorage', array($callback_obj,'createFile'));
32 
33 
34  $callback_obj->deleteDeprecated();
35  }
post($pattern, $callable)
Add POST route.
Definition: App.php:154
Create styles array
The data for the language used.
File storage handling.
+ Here is the call graph for this function:

The documentation for this class was generated from the following file: