OpenBroadcaster Documentation
classes / obfhelpers.php

OBFHelpers

Class

OpenBroadcaster helper functions.

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, ...]
public  image_format ( filename )

Determine image format.

Parameters
filename Image filename.
public  image_resize ( src, dst, width, height )

Resize an image.

Parameters
src Source filename.
dst Destination filename (JPEG).
width Target width.
height Target height.
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  sanitize_html ( html )

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

Parameters
html
Returns sanitized_html