Stud.IP  5.4
UserConfig Class Reference
Inheritance diagram for UserConfig:
RouteMap

Public Member Functions

 before (Router $router, array $handler, array $parameters)
 
 getConfig ($user_id, $field)
 
 setConfig ($user_id, $field)
 
 deleteConfig ($user_id, $field)
 
- Public Member Functions inherited from RouteMap
 __construct ()
 
 init ($router, $route)
 
 paginated ($data, $total, $uri_params=[], $query_params=[])
 
 paginate ($uri_format, $total, $offset=null, $limit=null)
 
 collect ($data)
 
 status ($status)
 
 headers ($headers=[])
 
 body ($body)
 
 contentType ($mime_type, $params=[])
 
 error ($status, $body=null)
 
 etag ($value, $strong_etag=true, $new_resource=null)
 
 expires ($amount, $cache_control=[])
 
 cacheControl ($values)
 
 halt ()
 
 lastModified ($time)
 
 notFound ($body=null)
 
 redirect ($url, $args=null)
 
 sendFile ($_path, $opts=[])
 
 url ($addr, $url_params=null)
 
 urlf ($addr_f, $format_params, $url_params=null)
 
 getRoutes ($http_method=null)
 
 getResponse ()
 

Additional Inherited Members

- Protected Member Functions inherited from RouteMap
 extractConditions ($docblock, $conditions=[])
 
- Protected Attributes inherited from RouteMap
 $router
 
 $route
 
 $data = null
 
 $response
 
 $pagination = false
 
 $offset
 
 $limit
 

Detailed Description

API routes for accessing user config values.

Author
Jan-Hendrik Willms tleil.nosp@m.ax+s.nosp@m.tudip.nosp@m.@gma.nosp@m.il.co.nosp@m.m GPL2 or any later version
Since
Stud.IP 3.4

user_id ^[0-9a-f]{1,32}$

404 if user does not exist 403 if user may access the request config item

Member Function Documentation

◆ before()

before ( Router  $router,
array  $handler,
array  $parameters 
)

Performs checks if the user exists and may actually access the requested config.

Parameters
Router$routerInstance of the api router
array$handlerDetected handler router
array$parametersParameters of the called route

◆ deleteConfig()

deleteConfig (   $user_id,
  $field 
)

Removes a specific config entry for a given user

/user/:user_id/config/:field

204 on success

◆ getConfig()

getConfig (   $user_id,
  $field 
)

Returns the value of a specific config entry for a given user

/user/:user_id/config/:field

Returns
mixed Value for the request config item 404 if config item does not exist

◆ setConfig()

setConfig (   $user_id,
  $field 
)

Stored the value of a specific config entry for a given user

/user/:user_id/config/:field

204 on success 400 if no value is given


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