OpenBroadcaster Documentation
classes / obfhelpers.php

OBFHelpers

Class

OpenBroadcaster helper functions.

public  test ( )

Test method. Simply echoes 'obfhelper test'.

public  sanitize_html ( html )

Sanitize HTML, allowing only specific tags and attributes from user input and stripping out everything else.

Parameters
html
Returns sanitized_html
public  require_args ( args, reqs )

Require specific named arguments in arrays passed to model methods. If any of the required arguments aren't passed, throw an error using user_error.

Parameters
args The array of arguments to check.
reqs The required arguments, in the format ['req1', 'req2', ...]
public  default_args ( &$args, defs )

Get list of arguments passed to a model method as reference, then set any arguments to the default if not specified.

Parameters
args A reference to the array of arguments to check.
defs The default values in case an argument is not set, in the format ['def1' => defval1, 'def2' => defval2, ...]