public function registerHelper($name, $helper = false)
    {
        if (is_array($name)) {
            foreach ($name as $n => $helper) {
                $this->registerHelper($n, $helper);
            }
        } elseif (is_object($name)) {
            $this->registerJavascriptObject('helper', $this->wrapHelperObject($name));
        } elseif ($helper === false) {
            $this->registerJavascriptObject('helper', $name);
        } elseif (is_callable($helper)) {
            $this->registerJavascriptFunction('helper', $name, $this->wrapHelperCallable($name, $helper));
        } else {
            $this->registerJavascriptFunction('helper', $name, $helper);
        }
    }
public function registerHelper($name, $helper = false)
    {
        if (is_array($name)) {
            foreach ($name as $n => $helper) {
                $this->registerHelper($n, $helper);
            }
        } elseif (is_object($name)) {
            $this->registerJavascriptObject('helper', $this->wrapHelperObject($name));
        } elseif ($helper === false) {
            $this->registerJavascriptObject('helper', $name);
        } elseif (is_callable($helper)) {
            $this->registerJavascriptFunction('helper', $name, $this->wrapHelperCallable($name, $helper));
        } else {
            $this->registerJavascriptFunction('helper', $name, $helper);
        }
    }
public function registerHelper ( $ name , $ helper = false ) { if ( is_array ( $ name ) ) { foreach ( $ name as $ n => $ helper ) { $ this -> registerHelper ( $ n , $ helper ) ; } } elseif ( is_object ( $ name ) ) { $ this -> registerJavascriptObject ( 'helper' , $ this -> wrapHelperObject ( $ name ) ) ; } elseif ( $ helper === false ) { $ this -> registerJavascriptObject ( 'helper' , $ name ) ; } elseif ( is_callable ( $ helper ) ) { $ this -> registerJavascriptFunction ( 'helper' , $ name , $ this -> wrapHelperCallable ( $ name , $ helper ) ) ; } else { $ this -> registerJavascriptFunction ( 'helper' , $ name , $ helper ) ; } }
Registers helpers accessible by any template in the environment
@param string|array|object $name
@param string|callable|bool $helper
Registers helpers accessible by any template in the environment