ILIAS  Release_5_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilRestServer Class Reference

Slim rest server. More...

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

Public Member Functions

 __construct ()
 Constructor.
 init ()
 Init server / add handlers.
- Public Member Functions inherited from Slim
 __construct ($userSettings=array())
 Constructor.
 getMode ()
 Get application mode.
 setName ($name)
 Set Slim application name.
 getName ()
 Get Slim application name.
 getLog ()
 Get application Log (lazy-loaded)
 configureMode ($mode, $callable)
 Configure Slim for a given mode.
 config ($name, $value=null)
 Configure Slim Settings.
 map ()
 Add generic route without associated HTTP method.
 get ()
 Add GET route.
 post ()
 Add POST route.
 put ()
 Add PUT route.
 delete ()
 Add DELETE route.
 options ()
 Add OPTIONS route.
 notFound ($callable=null)
 Not Found Handler.
 error ($argument=null)
 Error Handler.
 request ()
 Get the Request object.
 response ()
 Get the Response object.
 router ()
 Get the Router object.
 view ($viewClass=null)
 Get and/or set the View.
 render ($template, $data=array(), $status=null)
 Render a template.
 lastModified ($time)
 Set Last-Modified HTTP Response Header.
 etag ($value, $type= 'strong')
 Set ETag HTTP Response Header.
 setCookie ($name, $value, $time=null, $path=null, $domain=null, $secure=null, $httponly=null)
 Set a normal, unencrypted Cookie.
 getCookie ($name)
 Get the value of a Cookie from the current HTTP Request.
 setEncryptedCookie ($name, $value, $time=null, $path=null, $domain=null, $secure=null, $httponly=null)
 Set an encrypted Cookie.
 getEncryptedCookie ($name)
 Get the value of an encrypted Cookie from the current HTTP request.
 deleteCookie ($name, $path=null, $domain=null, $secure=null, $httponly=null)
 Delete a Cookie (for both normal or encrypted Cookies)
 root ()
 Get the Slim application's absolute directory path.
 stop ()
 Stop.
 halt ($status, $message= '')
 Halt.
 pass ()
 Pass.
 contentType ($type)
 Set the HTTP response Content-Type.
 status ($code)
 Set the HTTP response status code.
 urlFor ($name, $params=array())
 Get the URL for a named Route.
 redirect ($url, $status=302)
 Redirect.
 flash ($key, $value)
 Set flash message for subsequent request.
 flashNow ($key, $value)
 Set flash message for current request.
 flashKeep ()
 Keep flash messages from previous request for subsequent request.
 hook ($name, $callable, $priority=10)
 Assign hook.
 applyHook ($name, $hookArg=null)
 Invoke hook.
 getHooks ($name=null)
 Get hook listeners.
 clearHooks ($name=null)
 Clear hook listeners.
 run ()
 Run the Slim application.

Additional Inherited Members

- Static Public Member Functions inherited from Slim
static autoload ($class)
 Slim auto-loader.
static getInstance ($name= 'default')
 Get Slim application with name.
static handleErrors ($errno, $errstr= '', $errfile= '', $errline= '')
 Handle errors.
- Protected Member Functions inherited from Slim
 mapRoute ($args)
 Add GET|POST|PUT|DELETE route.
 defaultNotFound ()
 Default Not Found handler.
 defaultError ()
 Default Error handler.
- Static Protected Member Functions inherited from Slim
static generateErrorMarkup ($message, $file= '', $line= '', $trace= '')
 Generate markup for error message.
static generateTemplateMarkup ($title, $body)
 Generate default template markup.
- Protected Attributes inherited from Slim
 $name
 $request
 $response
 $router
 $view
 $log
 $settings
 $mode
 $hooks
- Static Protected Attributes inherited from Slim
static $apps = array()

Detailed Description

Slim rest server.

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

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

Constructor & Destructor Documentation

ilRestServer::__construct ( )

Constructor.

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

Member Function Documentation

ilRestServer::init ( )

Init server / add handlers.

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

References Slim\post().

{
$callback_obj = new ilRestFileStorage();
$this->get('/fileStorage/:name',array($callback_obj,'getFile'));
$this->post('/fileStorage',array($callback_obj,'createFile'));
$callback_obj->deleteDeprecated();
}

+ Here is the call graph for this function:


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