The famous register helper matching the Handlebars API

@param string $name The name of the helper
@param callable $helper The helper handler
@return Handlebars
7455
public function registerHelper(string $name, callable $helper): Handlebars
    {
        $this->runtime->addHelper($name, $helper);
        return $this;
    }
873205
public static function getHandlerByName($name)
    {
        return isset(self::$namedRoutes[$name]) ? self::$namedRoutes[$name][1] : null;
    }
665974
public static function registerHandler($path, $handler, $name = null)
    {
        $routeInfo             = [
            $path,
            $handler
        ];
        static::$routes[$path] = $routeInfo;
        if (!empty($name)) {
            self::$namedRoutes[$name] = $routeInfo;
        }
    }
1293264
public function unregister($name)
    {
        if ($this->exists($name)) {
            $this->handlers->remove($name);
        }

        return $this;
    }
140331
public function getHelper($name) {
        if ( !$this->helperExist($name) ) {
            throw new \Exception(sprintf('El Helper (%s) solicitado no fue cargado.', $name));
        }
        $helper = $this->_container[$name];
        $helper->configure([]);
        return $helper;
    }
961680
public function getHelper($name, array $options = [])
    {
        $helper = $this->get($name);
        if (! empty($options) && is_callable([$helper, 'setOptions'])) {
            $helper->setOptions($options);
        }

        return $helper;
    }
412167
public function createParser($name)
    {
        $parser = new Parser();

        $parser->setServer($this->createServer($name));

        $compiler = new Compiler(
            $parser->getServer()->getStartMultiLine(),
            $parser->getServer()->getEndMultiLine(),
            $parser->getServer()->getSimpleDirective()
        );

        $parser->setCompiler($compiler);

        return $parser;
    }
462331
public function addResolver(string $name, callable $callback)
    {
        //if it's a closure, they meant to bind the callback
        if ($callback instanceof Closure) {
            //so there's no scope
            $callback = $callback->bindTo($this, get_class($this));
        }

        $this->getResolverHandler()->register($name, $callback);

        return $this;
    }
483784
public function render($name)
    {
        return $this->helper->getRenderer($name)->render($this->get($name));
    }
1150111
public function getModifier($name)
    {
        if (isset($this->modifiers[$name])) {
            $callback = $this->modifiers[$name];
            if (!$callback) {
                $callback = $name;
            }
            return $callback;
        }

        return null;
    }
571502
public function register($name, $handler)
    {
        if (is_callable($handler)) {
            $params = array_merge(array($this), $this->params);
            $this->container[$name] = call_user_func_array($handler, $params);

        } else {
            $this->container[$name] = $handler;
        }

        return $this;
    }
224665
public function addMatcher($name, $matcher)
    {
        if (is_callable($matcher)) {
            $this->matchers[$name] = $matcher;
        }

        return $this;
    }
1179
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);
        }
    }
1319625
public function directive(string $name, callable $handler): BladeInterface
    {
        $this
            ->getCompiler()
            ->directive($name, $handler);

        return $this;
    }
730379
public function addHandler(callable $handler, $name = null)
    {
        if ($name) {
            $this->handlers[$name] = $handler;
        } else {
            $this->handlers[] = $handler;
        }

        return $this;
    }
487177
function registerHelper(name, helper) {
    var s = this;
    s.helpers = s.helpers || {};
    s.helpers[name] = helper;
    return s;
  }
617198
public function register($name, $callback)
    {
        if (! isset($this->registered_menus[$name])) {
            $this->registered_menus[$name] = [];
        }

        $this->registered_menus[$name][] = $callback;

        return $this;
    }