factory method to create a new wrapper object. if we're static publishing and an appropriate helper class is available it will use that instead. A helper class shouldn't be needed very often but would be used if you wanted a totally different class for publishing vs normal mode
Signature
public function wrap(object|array
$object,
[string
$class = 'ViewableWrapper',
[boolean
$add_init_code = true]] )
Parameters
$object
—
object
$class
—
string
- what class to wrap it in
$add_init_code
—
boolean
[optional] - if true, the classes default static init code will be added automatically