Stud.IP  trunk Revision
Blubber Class Reference
Inheritance diagram for Blubber:
Inheritance graph
Collaboration diagram for Blubber:
Collaboration graph

Public Member Functions

 getCourseBlubber ($course_id)
 
 createCourseBlubber ($course_id)
 
 getProfileBlubber ($user_id)
 
 createUserBlubber ($user_id)
 
 getCustomStreamBlubber ($stream_id)
 
 getBlubberData ($blubber_id)
 
 createNewBlubber ()
 
 getComments ($blubber_id)
 
 createComment ($blubber_id)
 
 editBlubberPosting ($blubber_id)
 
 deleteBlubberPosting ($blubber_id)
 
- 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)
 

Static Public Member Functions

static before ()
 

Additional Inherited Members

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

Detailed Description

GPL 2 or later

course_id ^[a-f0-9]{32}$ stream_id ^(global|[a-f0-9]{32})$ user_id ^[a-f0-9]{32}$ blubber_id ^[a-f0-9]{32}$

Member Function Documentation

◆ before()

static before ( )
static

Some inclusions before the routes can be prcessed

◆ createComment()

createComment (   $blubber_id)

Create a comment to a blubber

Postcondition
/blubber/posting/:blubber_id/comments
Parameters
string$blubber_idid of the blubber
stringblubbercontent content of the comment.
Here is the call graph for this function:

◆ createCourseBlubber()

createCourseBlubber (   $course_id)

Create a blubber in a course and redirects to the new blubber-route

Postcondition
/course/:course_id/blubber
Parameters
$course_idid of the course
string: content the content of the blubber
Here is the call graph for this function:

◆ createNewBlubber()

createNewBlubber ( )

Create a new blubber. POST-Parameters are blubbercontent, context_type, course_id, private_adressees. Redirects to the new blubber afterwards.

Postcondition
/blubber/postings
Parameters
stringcontent : content of the blubber. Can have {@}mentions if you want.
stringcontext_type : "public", "private" or "course". If set to "course" you need to define the parameter course_id.
string|nullcourse_id : id of the seminar, the blubber should be in. Leave away if context_type is not "course".
array|nullprivate_adressees : array of user_ids of people that should receive the private blubber. Remember that mentioned users will also see the private blubber, so it's your choice if the user should be mentioned or in this array. Leave blank if context_type is not "private".
Here is the call graph for this function:

◆ createUserBlubber()

createUserBlubber (   $user_id)

Create a blubber in a user's profile and redirects to the new blubber-route

Postcondition
/user/:user_id/blubber
Parameters
string$user_idid of the
stringcontent the content of the blubber
Here is the call graph for this function:

◆ deleteBlubberPosting()

deleteBlubberPosting (   $blubber_id)

Deletes the blubber and informs the author of the blubber if the current user is not the author of the blubber.

/blubber/posting/:blubber_id /blubber/comment/:blubber_id

Parameters
string$blubber_id
Here is the call graph for this function:

◆ editBlubberPosting()

editBlubberPosting (   $blubber_id)

Edits the content of a blubber. Sends a message of the change to the author, if the editing user is not the author of the blubber, to inform him/her about the change. If the content is empty the blubber is going to be deleted, because we don't want empty blubber in the system.

/blubber/posting/:blubber_id /blubber/comment/:blubber_id

Parameters
string$blubber_id
stringcontent new content for the blubber
Here is the call graph for this function:

◆ getBlubberData()

getBlubberData (   $blubber_id)

Displays all data to a special blubber

/blubber/posting/:blubber_id /blubber/comment/:blubber_id

Parameters
stringblubber_id id of a blubber thread
Returns
array array of blubber data
Here is the call graph for this function:

◆ getComments()

getComments (   $blubber_id)

Returns all comments of the blubber starting with the newest. Returns an empty array if blubber_id is from a comment.

/blubber/posting/:blubber_id/comments

Parameters
string$blubber_idid of the thread
Returns
array an collection array('collection' => array(...), 'pagination' => array())
Here is the call graph for this function:

◆ getCourseBlubber()

getCourseBlubber (   $course_id)

List blubber in a course

/course/:course_id/blubber

Parameters
string$course_idid of the course
Returns
Array the blubber as array('collection' => array(...), 'pagination' => array())
Here is the call graph for this function:

◆ getCustomStreamBlubber()

getCustomStreamBlubber (   $stream_id)

List blubber in a custom stream

/blubber/stream/:stream_id

Parameters
string$stream_idid of the stream or "global" if you want to access the global stream.
Returns
array the collection as array('collection' => array(...), 'pagination' => array())
Here is the call graph for this function:

◆ getProfileBlubber()

getProfileBlubber (   $user_id)

List blubber in a user's profile

/user/:user_id/blubber

Parameters
string$user_idid of the user
Returns
Array the blubber of a user as array('collection' => array(...), 'pagination' => array())

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