/**
* Import and (as required) initialize helpers for use in the view.
* Helper is the path and name of a class as used by Library::import().
* For multiple helpers, pass a single array of helpers or use multiple arguments.
*
* @param $helper
*/
public function loadHelper($helper)
{
$helpers = is_array($helper) ? $helper : func_get_args();
foreach ($helpers as $helper) {
Library::import($helper);
$init = array(Library::getClassName($helper), 'init');
if (is_callable($init)) {
call_user_func($init, $this);
}
}
}